Installing GCC-v10 on RHEL-v8

To install GCC-v10 on RHEL-v8, you can build/install GCC-v10 from source (not recommend as this takes longer and options may be set less consistently), or use the gcc-toolset-10. I am only providing notes for the latter method (gcc-toolset-10) here.

Installing gcc-toolset-10 on RHEL-v8

You will need the gcc-toolset-10 and scl-utils packages, which come from the rhel-8-for-x86_64-appstream-rpms repo…

sudo subscription-manager repos --enable rhel-8-for-x86_64-appstream-rpms

Once the repo is enabled, install scl-utils and gcc-toolset-10…

sudo yum -y install scl-utils gcc-toolset-10

Then enable the toolset…

(You may wish to add this to you ~/.bashrc file if you will normally develop in gcc-10 (this is recommended)

source scl_source enable gcc-toolset-10

Leave a Comment