Installing Dependencies
- Download and install the dependencies.
1yum install java-1.8.0-openjdk-* git gcc gcc-c++ make cmake3 libtool autoconf automake openssl-devel ninja-build golang apr-devel -y
If no available package is displayed when installing CMake, ninja-build, or Golang on CentOS, install the epel-release software package and run the installation command in 1 again.
- Download the epel-release RPM package.
1wget https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm --no-check-certificate
- Install epel-release.
1rpm -ivh epel-release-7-12.noarch.rpm
- Regenerate the local Yum source.
1 2
yum clean all yum makecache
- View CMake, ninja-build, and Golang.
1 2 3
yum search cmake yum search ninja-build yum search golang
- Download the epel-release RPM package.
- Create CMake and ninja soft links for CMake 3 and ninja-build, respectively.
1 2
ln -s /usr/bin/cmake3 /usr/bin/cmake ln -s /usr/bin/ninja-build /usr/bin/ninja
CMake later than version 3 and Ninja are required for the compilation. However, CMake 3 and ninja-build installed by Yum cannot be identified during compilation. You need to create soft links for CMake 3 and ninja-build.
- Check whether CMake is available. If a CMake version is displayed, CMake is available.
1cmake --version - Check whether ninja is available.If a ninja version is displayed, ninja is available.
1ninja --version - Configure Java.
- View the Java installation directory.
find /usr/lib/jvm/ -name java
Alternatively,find / -name java
Alternatively,which java
- CentOS:
ls /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/bin/java
- openEuler:
ls /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/bin/java
- CentOS:
- Configure the environment variables: JAVA_HOME, JRE_HOME, CLASSPATH, and PATH.
- Open the profile file.
vim /etc/profile
- Add the content of the corresponding system to the profile file.
- CentOS:
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64 export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/bin:$PATH
- openEuler:
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64 export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/bin:$PATH
- CentOS:
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the profile file.
- Make the environment variables take effect.
source /etc/profile
- View the environment variables.
echo $JAVA_HOME echo $JRE_HOME echo $CLASSPATH echo $PATH
- View the Java version.
java -version
- View the Java installation directory.
Parent topic: Configuring the Compilation Environment



