Installing GCC for openEuler
- Download GCC for openEuler to the /home directory.
wget https://mirror.iscas.ac.cn/kunpeng/archive/compiler/kunpeng_gcc/gcc-9.3.1-2021.03-aarch64-linux.tar.gz
- Decompress the package.
mkdir -p /opt/aarch64/compiler cp -rf gcc-9.3.1-2021.03-aarch64-linux.tar.gz /opt/aarch64/compiler cd /opt/aarch64/compiler tar -xf gcc-9.3.1-2021.03-aarch64-linux.tar.gz
- Set the environment variables and add the following content to the end of the profile file.
vi /etc/profile
export PATH=/opt/aarch64/compiler/gcc-9.3.1-2021.03-aarch64-linux/bin:$PATH export INCLUDE=/opt/aarch64/compiler/gcc-9.3.1-2021.03-aarch64-linux/include:$INCLUDE export LD_LIBRARY_PATH=/opt/aarch64/compiler/gcc-9.3.1-2021.03-aarch64-linux/lib64:$LD_LIBRARY_PATH
Press Esc, type :wq!, and press Enter to save the file and exit.
Run the following command for the environment variables to take effect. After reconnecting to the server, you do not need to run the following command again. The system automatically loads the environment configuration.
source /etc/profile
- After setting and loading the Kunpeng GCC environment variables, verify the Kunpeng GCC compiler version.
gcc –v
If the command output contains the Kunpeng GCC version information, the Kunpeng GCC compiler has been successfully installed.

Parent topic: Configuring the Compilation Environment