centos7 installation bazel, possible pro-test

1 prerequisite: openjdk1.8, openjdk-devel1.8

I'm using the latest java11, because of the need javac program, so you need to install devel packages:
sudo yum install java11-openjdk
sudo yum install java11-openjdk-devel

2, download and install bazel
Download: wget https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.repo (with command line input and wget back links)
then move to /etc/yum.repos.d/ directory: mv vbatts-bazel-epel- 7.repo /etc/yum.repos.d
or copy: cp vbatts-bazel-epel- 7.repo / etc / yum .repos.d
install: yum install bazel

3, add the environment variable
After completion, bazel is not recognized by the command. In this case bazel installed in / usr / bin below

Add environmental variables in / etc / profile are:
use the command: Vim / etc / profile open profile file, add the following two lines of code in the back:

export BAZEL_HOME=/usr/bin
export PATH = P A T H : PATH: BAZEL_HOME

So, bazel installation is complete.

4, command line, type: bazel version
to view bazel version number installed.

Reference article:
https://blog.csdn.net/u012543819/article/details/84936986

Guess you like

Origin blog.csdn.net/xavier_muse/article/details/93203093