Installing GCC
If the default GCC version of the current OS is not 12.3.1, install GCC 12.3.1 by following the instructions provided in this section. After the installation is complete, check whether the installed software version is the correct one.
- Install GCC 12.3.1.
1 2 3
yum install -y gcc-toolset-12-gcc* export PATH=/opt/openEuler/gcc-toolset-12/root/usr/bin/:$PATH export LD_LIBRARY_PATH=/opt/openEuler/gcc-toolset-12/root/usr/lib64/:$LD_LIBRARY_PATH
- Verify the installation.
1gcc --versionThe installation is successful if the following information is displayed:
1 2 3 4
gcc (GCC) 12.3.1 20230508 (openEuler 12.3.1-16.oe2203sp3) Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Parent topic: Compilation Environment Configuration