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
diff --git a/site/docs/install-ubuntu.md b/site/docs/install-ubuntu.md
index 7061c71..ae6599c 100644
--- a/site/docs/install-ubuntu.md
+++ b/site/docs/install-ubuntu.md
@@ -18,8 +18,8 @@
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 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
+### Step 2: Download Bazel
-**Note:** In the installer file names listed in this document, replace
-`<version>` with the appropriate Bazel version number.
+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).
-Go to Bazel's [GitHub releases page](https://github.com/bazelbuild/bazel/releases).
+### Step 3: Run the installer
-Download the binary installer `bazel-<version>-installer-linux-x86_64.sh`.
-
-### 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 @@
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 @@
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