How to specify the version when installing gcc with yum?
To specify a version when installing gcc with yum, you need to use the yum’s versionlock feature. Here are the specific steps:
- First, check all available versions of gcc.
yum list gcc
- Then choose the specific version you want to install, such as version 7.
yum install gcc-7
- If you want to specify more detailed version information, you can use the full software package name:
yum install gcc-7.3.1
Through these steps, you can specify a specific version when installing gcc with yum. Make sure that the selected version is available in your yum repository.