首先,安装jdk8
这里省略jdk8的安装过程
在包资源中增加Bazel的发布源
echo"deb[arch=amd64]http://storage.googleapis.com/bazel-aptstablejdk1.8"|sudotee/etc/apt/sources.list.d/bazel.list
curlhttps://bazel.build/bazel-release.pub.gpg|sudoapt-keyadd-
安装和更新Bazel
sudoapt-getupdate&&sudoapt-getinstallbazel
sudoapt-getupgradebazel