sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python3
wget https://github.com/bazelbuild/bazel/releases/download/5.2.0/bazel-5.2.0-installer-linux-x86_64.sh
chmod +x bazel-5.2.0-installer-linux-x86_64.sh
./bazel-5.2.0-installer-linux-x86_64.sh --user
export PATH="$PATH:$HOME/bin"
bazel build //hello-world --remote_max_connections 0
https://blog.csdn.net/qq_41204464/article/details/95333396?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165236796916780366539337%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=165236796916780366539337&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-1-95333396-null-null.142^v9^pc_search_result_cache,157^v4^control&utm_term=bazel%E5%AE%89%E8%A3%85&spm=1018.2226.3001.4187
Bazel is bundled with software licensed under the GPLv2 with Classpath exception.
You can find the sources next to the installer on our release page:
https://github.com/bazelbuild/bazel/releases
#
## Build information
- [Commit](https://github.com/bazelbuild/bazel/commit/b1d47fe)
Uncompressing......WARNING: Invoking Bazel in batch mode since it is not invoked from within a workspace (below a directory having a WORKSPACE file).
Extracting Bazel installation...
.
Bazel is now installed!
Make sure you have "/home/bit010/bin" in your path.
For bash completion, add the following line to your ~/.bashrc:
source /home/bit010/.bazel/bin/bazel-complete.bash
For fish shell completion, link this file into your
/home/bit010/.config/fish/completions/ directory:
ln -s /home/bit010/.bazel/bin/bazel.fish /home/bit010/.config/fish/completions/bazel.fish
See http://bazel.build/docs/getting-started.html to start a new project!