截至今天,只有Ubuntu软件包可用.
Bazel可以在CentOS 6.x上编译吗?
Bazel经过测试,能够使用此docker文件生成的docker镜像在CentOS 6.7上进行编译.CentOS 6.7附带的C++编译器太旧了,无法编译Bazel,所以诀窍就是使用更新的:
# Install the dependencies of Bazel yum install java-1.8.0-openjdk-devel wget which findutils binutils gcc tar gzip zip unzip java java-devel git clang zlib-devel gcc-c++ # Install a newer gcc wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo yum install devtoolset-2-gcc devtoolset-2-gcc-c++ devtoolset-2-binutils # Set the path to java and gcc export JAVA_HOME=/usr/lib/jvm/java-1.8.0 export CC=/opt/rh/devtoolset-2/root/usr/bin/gcc # Clone the repository git clone https://github.com/bazelbuild/bazel /tmp/bazel # Compile bazel cd /tmp/bazel; ./compile.sh # Copy the bazel binary to some binary directory cp /tmp/bazel/output/bazel ~/bin