Using devtoolset-9 on your RHEL7 desktop/laptop

From epsciwiki
Revision as of 12:02, 14 April 2022 by Davidl (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In order to access newer compiler versions on you JLab RHEL7 desktop/laptop, you need to do a few steps that enable the proper repository subscriptions. I should note that there are a few different ways to access newer compilers, but this one seems "blessed" by RedHat.

These instructions are for RHEL7.9, but may work with other versions. You will need sudo privileges on the machine.


  1. sudo subscription-manager list --available
    • Look for the Pool ID of Software Collections and Developer Toolset
    • If you do not see it, then you may have already attached it. Run the command sudo subscription-manager list --consumed to see if it is already attached. If it is, just skip the next step.
  2. sudo subscription-manager attach --pool=01b9a2057e7878ac017e97f9d31624e8
  3. sudo subscription-manager repos --list
    • Look for the Repo ID for rhscl
  4. sudo subscription-manager repos --enable rhel-workstation-rhscl-7-rpms
  5. yum search devtoolset
    • Look for the version of devtoolset you wish to install
  6. sudo yum install devtoolset-9


To use the tools from a given toolset, you need to launch a new shell with those enabled via:

scl enable devtoolset-9 tcsh

You will need to do this for every shell you use with the toolset.