How to Install Bazel on Kali Linux Latest
Bazel is a powerful build tool that can be used to manage the dependencies and builds of various programming languages. In this tutorial, we will show you how to install Bazel on Kali Linux Latest.
Prerequisites
Before you proceed, make sure you have the following:
- Kali Linux Latest installed.
- A non-root user with sudo privileges.
Step 1: Install OpenJDK
Bazel requires Java to be installed on your system. We will install OpenJDK, a free and open-source implementation of the Java Platform.
To install OpenJDK, execute the following command:
sudo apt update
sudo apt install -y openjdk-11-jdk-headless
Step 2: Download Bazel
Download the Bazel binary installer by running the following command:
wget https://github.com/bazelbuild/bazel/releases/download/4.2.0/bazel-4.2.0-installer-linux-x86_64.sh
Step 3: Verify the SHA256 checksum
Verify the SHA256 checksum of the downloaded file by running the following command:
echo "7c24b1e0de96694028d61ba55a8f617a0a985c57e01dbba05b523d07182274ea bazel-4.2.0-installer-linux-x86_64.sh" | sha256sum -c -
If the output shows "OK", you can proceed to the next step.
Step 4: Install Bazel
Make the downloaded file executable:
chmod +x bazel-4.2.0-installer-linux-x86_64.sh
Run the installer:
sudo ./bazel-4.2.0-installer-linux-x86_64.sh --user
This will install Bazel to your home directory.
Step 5: Add Bazel to your PATH
Append the following line to your ~/.bashrc file:
export PATH="$HOME/bin:$PATH"
Source your ~/.bashrc file:
source ~/.bashrc
Step 6: Verify the installation
Verify that Bazel is installed and configured correctly by running the following command:
bazel version
If the output shows the version number of Bazel, the installation was successful.
Conclusion
In this tutorial, you learned how to install Bazel on Kali Linux Latest. With Bazel installed, you can develop and build your projects with ease.