Installing Dependencies
- Download and install the epel-release software package (only for CentOS).
- Download the epel-release RPM package.
1 2
cd /home/ wget https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm --no-check-certificate
- Install the epel-release RPM package.
1rpm -ivh epel-release-7-12.noarch.rpm
Extra Packages for Enterprise Linux (EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS, and Scientific Linux.
- Download the epel-release RPM package.
- Install Golang.
1yum -y install golang*
- On openEuler, if an error message is displayed stating "conflicting requests", run the following command:
yum -y install golang* --skip-broken
- On CentOS, if an error message is displayed stating "Cannot retrieve metalink for repository: epel/aarch64. Please verify its path and try again", perform the following operations to modify the /etc/yum.repos.d/epel.repo file and reinstall Golang:
- Open the /etc/yum.repos.d/epel.repo file.
1vim /etc/yum.repos.d/epel.repo - Press i to enter the insert mode and modify the following content:
[epel] ... baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch #metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch&infra=$infra&content=$contentdir ....
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the /etc/yum.repos.d/epel.repo file.
- On openEuler, if an error message is displayed stating "conflicting requests", run the following command:
- Configure Golang.
- Open the profile file.
1vim /etc/profile - Press i to enter the insert mode and add the following content to the file.
- CentOS:
export GOPATH=/root/go export GOROOT=/usr/lib/golang export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
- openEuler:
export GOPATH=/root/go export GOROOT=/usr/lib/golang export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
- CentOS:
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Make the new environment variables take effect.
1source /etc/profile
- View the version.
1go version
- Open the profile file.
- Download and install the dependencies.
1yum install java-1.8.0-openjdk-* git gcc gcc-c++ make clang openssl openssl-devel -y
- 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.
- Download and install the libunwind libraries.
- Install libtool using Yum.
1yum -y install libtool
- Download the libunwind installation package.
1 2
cd /home/ wget https://github.com/libunwind/libunwind/releases/download/v1.5/libunwind-1.5.0.tar.gz --no-check-certificate
- Decompress the source package.
tar -xzf libunwind-1.5.0.tar.gz
- Go to the source code directory.
cd libunwind-1.5.0
- Perform the compilation and installation.
1./configure && make -j60 && make install
- Install libtool using Yum.
Parent topic: Configuring the Compilation Environment



