一、首先,安装jdk8
这里省略jdk8的安装过程
二、在包资源中增加Bazel的发布源
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
三、安装和更新Bazel
sudo apt-get update && sudo apt-get install bazel
sudo apt-get upgrade bazel