Bazel構建工具的安裝

官方Doc:https://docs.bazel.build/versions/master/install-ubuntu.htmlhtml

1. Install JDK 8

安裝JDK 8使用下面命令::java

sudo apt-get install openjdk-8-jdk

在 Ubuntu 14.04 LTS你可能須要使用 PPA:web

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-java8-installer 

2. 添加Bazel分發URI做爲包源(一次設置)

輸入下面命令ubuntu

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 - 

If you want to install the testing version of Bazel, replace stable with testing.api

3. 安裝和更新 Bazel

sudo apt-get update && sudo apt-get install bazel 

一旦安裝,您能夠升級到更新版本的Bazel:bash

sudo apt-get upgrade bazel
相關文章
相關標籤/搜索