注意事项: 编译过程如果有错误提示少什么库,则相应的安装库即可
在编译中出现 g++: internal compiler error: Killed (program cc1plus)的错误是因为内存不足,我在虚拟机中编译的,所以把内存提升到3G,
Then-j 1 at make, or without-j parameters
1. Download the source code
$ wget http://www.apache.org/dist/mesos/0.28.2/mesos-0.28.2.tar.gz$ tar -zxvf mesos-0.28.2.tar.gz
2. 准备编译环境
# Update the packages.$ sudo apt-get update# Install a few utility tools.$ sudo apt-get install -y tar wget git# Install the latest OpenJDK.$ sudo apt-get install -y openjdk-7-jdk
或者直接下载jdk,然后指定JAVA_HOME和PATH# Install autotools (Only necessary if building from git repository).$ sudo apt-get install -y autoconf libtool# Install other Mesos dependencies.$ sudo apt-get -y install build-essential python-dev libcurl4-nss-dev libsasl2-dev libsasl2-modules maven libapr1-dev libsvn-dev
3. 编译
# Change working directory.$ cd mesos# Bootstrap (Only required if building from git repository).$ ./bootstrap# Configure and build.$ mkdir build$ cd build$ ../configure --prefix=/home/xxx/mesos$ make V=0
# Run test suite.$ make check# Install (Optional).$ make install
更全面的内容参考 http://mesos.apache.org/gettingstarted/
Mesos compilation Steps and Considerations (Ubuntu)