diff options
author | spomorski <spomorski@google.com> | 2018-04-18 10:34:42 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-18 10:36:47 -0700 |
commit | ff634f75bc2aadcba577f315ac8548a368c0dccd (patch) | |
tree | dad7f5a494654f1a333493caaeb9f6914b5831b7 | |
parent | 2813550cbb506a684fd1346d0439586f8d2b8fec (diff) |
Update Ubuntu install instructions as per PR 5024.
https://github.com/spomorski/bazel/edit/patch-1/site/docs/install-ubuntu.md?pr=/bazelbuild/bazel/pull/5024
PiperOrigin-RevId: 193379306
-rw-r--r-- | site/docs/install-ubuntu.md | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/site/docs/install-ubuntu.md b/site/docs/install-ubuntu.md index 7061c71a9b..ae6599cd0a 100644 --- a/site/docs/install-ubuntu.md +++ b/site/docs/install-ubuntu.md @@ -18,8 +18,8 @@ Install Bazel on Ubuntu using one of the following methods: Bazel comes with two completion scripts. After installing Bazel, you can: -* access the [bash completion script](install.md) -* install the [zsh completion script](install.md) +* Access the [bash completion script](install.md) +* Install the [zsh completion script](install.md) ## <a name="install-with-installer-ubuntu"></a>Installing using binary installer @@ -28,24 +28,22 @@ The binary installers are on Bazel's [GitHub releases page](https://github.com/b The installer contains the Bazel binary<sup>1</sup>. Some additional libraries must also be installed for Bazel to work. -### 1. Install required packages +### Step 1: Install required packages + +First, install the prerequisites: `zip`, `g++`, `zlipb1g-dev`, `unzip`, and `python`. ```bash sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python ``` -### 2. Download Bazel - -**Note:** In the installer file names listed in this document, replace -`<version>` with the appropriate Bazel version number. +### Step 2: Download Bazel -Go to Bazel's [GitHub releases page](https://github.com/bazelbuild/bazel/releases). +Next, download the Bazel binary installer named `bazel-<version>-installer-linux-x86_64.sh` +from the [Bazel releases page on GitHub](https://github.com/bazelbuild/bazel/releases). -Download the binary installer `bazel-<version>-installer-linux-x86_64.sh`. +### Step 3: Run the installer -### 3. Run the installer - -Run the installer: +Run the Bazel installer as follows: ```bash chmod +x bazel-<version>-installer-linux-x86_64.sh @@ -56,7 +54,7 @@ The `--user` flag installs Bazel to the `$HOME/bin` directory on your system and sets the `.bazelrc` path to `$HOME/.bazelrc`. Use the `--help` command to see additional installation options. -### 4. Set up your environment +### Step 4: Set up your environment If you ran the Bazel installer with the `--user` flag as above, the Bazel executable is installed in your `$HOME/bin` directory. It's a good idea to add @@ -68,44 +66,46 @@ export PATH="$PATH:$HOME/bin" You can also add this command to your `~/.bashrc` file. -_<sup>1</sup>Note that Bazel includes an embedded JDK 8, which can be used even if a JDK is already +_<sup>1</sup>Note that Bazel includes an embedded JDK, which can be used even if a JDK is already installed. `bazel-<version>-without-jdk-installer-linux-x86_64.sh` is a version of the installer -without embedded JDK 8. Only use this installer if you already have JDK 8 installed._ +without an embedded JDK. Only use this installer if you already have JDK 8 installed. Later JDK +versions are not supported._ ## <a name="install-on-ubuntu"></a> Using Bazel custom APT repository -### 1. Install JDK 8 +### Step 1: Install the JDK -Install JDK 8 by using: +Install JDK 8: ```bash sudo apt-get install openjdk-8-jdk ``` -On Ubuntu 14.04 LTS you'll have to use a PPA: +On Ubuntu 14.04 LTS you must use a PPA: ```bash sudo add-apt-repository ppa:webupd8team/java sudo apt-get update && sudo apt-get install oracle-java8-installer ``` -### 2. Add Bazel distribution URI as a package source (one time setup) +### Step 2: Add Bazel distribution URI as a package source + +**Note:** This is a one-time setup step. ```bash 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`. +If you want to install the testing version of Bazel, replace `stable` with `testing`. -### 3. Install and update Bazel +### Step 3: Install and update Bazel ```bash sudo apt-get update && sudo apt-get install bazel ``` -Once installed, you can upgrade to a newer version of Bazel with: +Once installed, you can upgrade to a newer version of Bazel with the following command: ```bash sudo apt-get upgrade bazel |