-
Ensure that you have OpenJDK 8 installed on your system.
-
You can check this by running
which javac
-
-
if output is
which: no javac
Install OpenJDK 8 by running the commandsudo pacman -S jdk8-openjdk
Please not this is jdk not jre else you'll into the error $JAVA_HOME not set
-
Download bazel--dist.zip from the release page for the desired version.
-
Ensure you have zip installed on your system else the build will fail
-
You can check this by running
zip
-
-
if output is
bash: command not found
Install zip by running the commandsudo pacman -S zip
-
Unzip the archive and call
./compile.sh
this will create a bazel binary in output/bazel. This binary is self-contained, so it can be copied to a directory on the PATH (such as /usr/bin) -
Test drive
which bazel
output should be /usr/bin/bazel