Install scl-utils if you want the scl command. But, you will not find devtoolset-7. The most you will find scl wise is gcc-toolset-* packages, which are all newer than the provided gcc in Rocky Linux 8 and 9. If you are trying to install gcc 7 and its components, you will not be able to. It’s not s… Answer from label on forums.rockylinux.org
Discussions

g++ - How can I install devtoolset on the workstation edition of RHEL7 - Stack Overflow
sudo yum install centos-release-scl sudo yum install devtoolset-7-gcc* scl enable devtoolset-7 bash which gcc gcc --version More on stackoverflow.com
🌐 stackoverflow.com
linux - How to permanently enable newer version of software installed from SCL repo? - Unix & Linux Stack Exchange
So when you put it in your .bashrc, it creates a new shell...which loads your .bashrc, which runs scl enable devtoolset-1.1 bash, which creates a new shell, which loads your .bashrc... Forkbomb! You probably want something like this in your .bashrc: if [ "$(gcc -dumpversion)" != "4.7.2" ]; then ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
December 25, 2014
Announcing release of Developer Toolset 7 on CentOS Linux 7 x86_64 SCL - announce - lists.centos.org
I am pleased to announce the immediate ... Linux 7 x86_64, delivered via a Software Collection (SCL) built by the SCLo Special Interest Group (https://wiki.centos.org/SpecialInterestGroup/SCLo). QuickStart ---------- You can get started in three easy steps: $ sudo yum install centos-release-scl $ sudo yum install devtoolset-7 $ scl enable ... More on lists.centos.org
🌐 lists.centos.org
linux - Can not find required gcc version after devtoolset installation - Stack Overflow
My current gcc version is 4.8.5 and I am trying to install gcc 7 or later versions. I have followed instructions from How to install GCC/G++ 8 on CentOS · When I try scl enable devtoolset-8 -- bash, it shows More on stackoverflow.com
🌐 stackoverflow.com
🌐
GitHub
github.com › sclorg › devtoolset-container › blob › master › 7-toolchain › Dockerfile
devtoolset-container/7-toolchain/Dockerfile at master · sclorg/devtoolset-container
PATH=/opt/app-root/src/bin:/opt/app-root/bin:/opt/rh/devtoolset-7/root/usr/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin · · RUN mkdir -p ${HOME} && \ groupadd -r default -f -g 1001 && \ usermod -g default default && \ chown -R 1001:1001 /opt/app-root /usr/bin/container-entrypoint /usr/bin/usage && \ chmod u+x /usr/bin/usage && \ rpm-file-permissions · · USER 1001 · · WORKDIR ${HOME} · # Enable the SCL for all bash scripts.
Author   sclorg
Top answer
1 of 1
1

This issue in this case is RedHat subscription channels. Though the subscription and software are free (provided you have an active subscription already), for some reason you have to make a 'special request' to RedHat as per:

https://access.redhat.com/solutions/472793

You can automate this by visiting:

https://www.redhat.com/wapps/try/RHSCL

(when logged into the support portal). This should automatically be approved after which you can attach a new subscription. Identify the pool id using:

subscription-manager list --available --all

To find the pool id:

 Subscription Name:   Software Collections and Developer Toolset
 Provides:            Red Hat Developer Tools (for RHEL Server)
                      Red Hat Developer Tools Beta (for RHEL Workstation)
                      Red Hat Software Collections Beta (for RHEL Server)
                      Red Hat Software Collections Beta (for RHEL Workstation)
                      Red Hat Software Collections (for RHEL Server)
                      Red Hat Developer Tools Beta (for RHEL Server)
                      Red Hat Developer Toolset (for RHEL Workstation)
                      Red Hat Software Collections Beta (for RHEL Client)
                      Red Hat Software Collections (for RHEL Workstation)
                      Red Hat Developer Toolset (for RHEL Server)
                      Red Hat Developer Tools (for RHEL Workstation)
                      Red Hat Software Collections (for RHEL Client) 
SKU:                 foobar 
Contract:            1234 Pool ID: XXXXXXXXXX

Then attach this and enable the newly available repos:

>subscription-manager attach --pool=XXXXXXXXXXXXXXXXXXXX
Successfully attached a subscription for: Software Collections and Developer Toolset
>subscription-manager repos --enable rhel-workstation-rhscl-7-rpms
Repository 'rhel-workstation-rhscl-7-rpms' is enabled for this system.
>subscription-manager repos --enable rhel-7-workstation-devtools-rpms
Repository 'rhel-7-workstation-devtools-rpms' is enabled for this system.

You can now install freely:

>yum update -y 
>yum install -y devtoolset-7-gcc-c++

Quite why they make you jump through so many hoops is explained by RedHat as follows:

-If you have a 2013 RHEL SKU with Standard or Premium service level, there should be no action on your part, and your subscription should have full access to RHSCL.

-If you have a 2010 or older RHEL SKU with Standard or Premium service level, you should contact Red Hat Customer Service to request the RHSCL SKU (and all related content) added to your account.

NOTE: Developer Toolset is now included as part of Red Hat Software Collections. This change was made on May 29, 2014.

As you had Red Hat Enterprise Linux Workstation, Standard subscription which is older RHEL SKU with Standard service level, you had to initiate a special request for it

🌐
Softwarecollections
softwarecollections.org › en › scls › rhscl › devtoolset-8
Developer Toolset 8 — Software Collections
# 1. Install a package with repository for your system: # On CentOS, install package centos-release-scl available in CentOS repository: $ sudo yum install centos-release-scl # On RHEL, enable RHSCL repository for you system: $ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms # 2. Install the collection: $ sudo yum install devtoolset-8 # 3.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360004312319-enable-scl-devtoolset
enable scl devtoolset – IDEs Support (IntelliJ Platform) | JetBrains
So all you have to do is tell CLion to point towards what devtoolset is providing. When you do scl enable devtoolset, it is simply pointing towards what devtoolset provides.
🌐
Ahelpme
ahelpme.com › home › linux › centos 7 › how to install new gcc and development tools under centos 7
How to install new gcc and development tools under CentOS 7 | Any IT here? Help Me!
September 5, 2019 - And you’ll be in a bash environment, which is configured for GNU GCC 7. [srv@local ~]# scl enable devtoolset-7 bash [srv@local ~]# which gcc /opt/rh/devtoolset-7/root/usr/bin/gcc [srv@local ~]# gcc --version gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) Copyright (C) 2017 Free Software Foundation, Inc.
Top answer
1 of 5
93

In your ~/.bashrc or ~/.bash_profile Simply source the "enable" script provided with the devtoolset. For example, with the Devtoolset 2, the command is:

source /opt/rh/devtoolset-2/enable

or

source scl_source enable devtoolset-2

Lot more efficient: no forkbomb, no tricky shell

2 of 5
17

An alternative of source /opt/rh/devtoolset-4/enable is

source scl_source enable devtoolset-4

The above shell script scl_source is more elegant than using a hard coded path (may be different on another machine). However scl_source does less because /opt/rh/devtoolset-4/enable uses scl_source and other stuff.

To use scl_source you may have to upgrade package scl-utils

yum update scl-utils  # old scl-utils versions miss scl_source

Quick copy-paste

echo 'source scl_source enable devtoolset-4' >> ~/.bashrc
    # Do not forget to change the version ↑

Source code for curious people

An example of scl_source source code:
https://gist.github.com/bkabrda/6435016

The scl_source installed on my Red Hat 7.1

#!/bin/bash

_scl_source_help="Usage: source scl_source <action> [<collection> ...]

Don't use this script outside of SCL scriptlets!

Options:
    -h, --help    display this help and exit"

if [ $# -eq 0 -o $1 = "-h" -o $1 = "--help" ]; then
    echo "$_scl_source_help"
    return 0
fi


if [ -z "$_recursion" ]; then
    _recursion="false"
fi
if [ -z "$_scl_scriptlet_name" ]; then
    # The only allowed action in the case of recursion is the same
    # as was the original
    _scl_scriptlet_name=$1
fi
shift 1

if [ -z "$_scl_dir" ]; then
    # No need to re-define the directory twice
    _scl_dir=/etc/scl/conf
    if [ ! -e $_scl_dir ]; then
        _scl_dir=/etc/scl/prefixes
    fi
fi

for arg in "$@"; do
    _scl_prefix_file=$_scl_dir/$arg
    _scl_prefix=`cat $_scl_prefix_file 2> /dev/null`
    if [ $? -ne 0 ]; then
        echo "Can't read $_scl_prefix_file, $arg is probably not installed."
        return 1
    fi

    # First check if the collection is already in the list
    # of collections to be enabled
    for scl in ${_scls[@]}; do
        if [ $arg == $scl ]; then
            continue 2
        fi
    done

    # Now check if the collection isn't already enabled
    /usr/bin/scl_enabled $arg > /dev/null 2> /dev/null
    if [ $? -ne 0 ]; then
        _scls+=($arg)
        _scl_prefixes+=($_scl_prefix)
    fi;
done

if [ $_recursion == "false" ]; then
    _i=0
    _recursion="true"
    while [ $_i -lt ${#_scls[@]} ]; do
        _scl_scriptlet_path="${_scl_prefixes[$_i]}/${_scls[$_i]}/${_scl_scriptlet_name}"
        source "$_scl_scriptlet_path"
        if [ $? -ne 0 ]; then
            echo "Can't source $_scl_scriptlet_name, skipping."
        else
            export X_SCLS="${_scls[$_i]} $X_SCLS"
        fi;
        _i=$(($_i+1))
    done
    _scls=()
    _scl_prefixes=()
    _scl_scriptlet_name=""
    _recursion="false"
fi
Find elsewhere
🌐
Centos
lists.centos.org › hyperkitty › list › announce@lists.centos.org › thread › 2APH7YUSNGVRJD5LAXBI46BBB5AKWHZZ
Announcing release of Developer Toolset 7 on CentOS Linux 7 x86_64 SCL - announce - lists.centos.org
I am pleased to announce the immediate availability of Developer Toolset in version 7 on CentOS Linux 7 x86_64, delivered via a Software Collection (SCL) built by the SCLo Special Interest Group (https://wiki.centos.org/SpecialInterestGroup/SCLo). QuickStart ---------- You can get started in three easy steps: $ sudo yum install centos-release-scl $ sudo yum install devtoolset-7 $ scl enable devtoolset-7 bash
🌐
Oracle
docs.oracle.com › en › operating-systems › oracle-linux › scl-user › scl-SoftwareCollectionLibrariesforOracleLinux7aarch64.html
Oracle Linux: Software Collection Library for Oracle Linux 7
January 2, 2025 - The following collections are available for Oracle Linux 7 on the 64-bit Arm (aarch64) platform: devtoolset-6 · devtoolset-7 · devtoolset-8 · devtoolset-9 · devtoolset-10 · httpd24 · oracle-armtoolset-1 · oracle-armtoolset-8 · python27 · rh-git29 · rh-git218 · rh-maven35 ·
🌐
University of Edinburgh
computing.help.inf.ed.ac.uk › scl
Software Collections | Documentation
To activate the devtoolset you need to do something like this: ... This would launch a new sub-shell with the necessary settings for your path, library load path, etc. When you exit the shell (in the usual way with ctrl-d or by typing exit) everything returns to normal. You can run any application or script you wish, it does not need to be a shell. The scl enable command is used to enable the specified software collection.
🌐
Docker Hub
hub.docker.com › r › centos › devtoolset-7-toolchain-centos7
centos/devtoolset-7-toolchain-centos7 - Docker Image
Developer Toolchain is part of the Red Hat Software Collections and the Toolchain is a subset of tools usable for building C and C++ applications. Docker container based on Red Hat Software Collection packages is available as rhscl/devtoolset-7-toolchain-rhel7 in registry.access.redhat.com.
Top answer
1 of 1
2

You should verify that python27 is coming from SCL and not elsewhere.

In my case I am using CentOS 6, but the process is the same.

So:

$ yum info python27  
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
6 packages excluded due to repository priority protections
Available Packages
Name        : python27
Arch        : x86_64
Version     : 1.1
Release     : 25.el6
Size        : 5.2 k
Repo        : centos-sclo-rh
Summary     : Package that installs python27
License     : GPLv2+
Description : This is the main package for python27 Software Collection.

We can see it comes from centos-sclo-rh and so is the right version.

We can install this. Because it's from SCL it will install into /opt/rh and this will not impact any other aspect of the OS:

$ sudo yum install python27
...
$ ls /opt/rh
python27

We can see the default python is still unchanged:

$ /usr/bin/python --version
Python 2.6.6

Now we need the scl command. This is from the scl-utils package, which you may need to install (yum install scl-utils).

$ scl enable python27 bash

This runs a new shell with the path changed:

$ scl enable python27 bash
bash-4.1$ echo $PATH
/opt/rh/python27/root/usr/bin:/usr/local/bin:/usr/bin/X11:/etc:/usr/local/sbin:/sbin:/usr/sbin
bash-4.1$ command -v python
/opt/rh/python27/root/usr/bin/python
bash-4.1$ python --version
Python 2.7.8

So enabling and running SCL does not impact the core OS; it won't break anything you normally run but allows for a newer version of python to be installed in parallel (in /opt/rh).

🌐
Stack Overflow
stackoverflow.com › questions › tagged › devtoolset
Recently Active 'devtoolset' Questions - Stack Overflow
To install devtoolset-7.x86_64 on CentOS6 is pretty easy: yum install -y centos-release-scl yum install -y devtoolset-7-toolchain However, i686 is not available for download: http://mirror.centos.org/...
🌐
GitHub
github.com › sclorg › devtoolset-container › blob › master › 4-toolchain › Dockerfile.rhel7
devtoolset-container/4-toolchain/Dockerfile.rhel7 at master · sclorg/devtoolset-container
May 7, 2025 - Devtoolset container images based on Red Hat Software Collections, that provide a platform for building and running C and C++ applications. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
Author   sclorg
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_developer_toolset › 9 › html › 9.0_release_notes › dts9.0_release
Chapter 2. Red Hat Developer Toolset 9.0 Release | 9.0 Release Notes | Red Hat Developer Toolset | 9 | Red Hat Documentation
This namely applies to devtoolset-version-gcc-debuginfo, devtoolset-version-ltrace-debuginfo, devtoolset-version-valgrind-debuginfo, and might apply to other debuginfo packages, too. A similar conflict can also occur in a multilib environment, where 64-bit debuginfo packages conflict with 32-bit debuginfo packages. For example, on Red Hat Enterprise Linux 7, devtoolset-7-gcc-debuginfo conflicts with three packages: gcc-base-debuginfo, gcc-debuginfo, and gcc-libraries-debuginfo.
🌐
Reddit
reddit.com › r/cpp › devtoolset is a game changer for c++ development on linux
r/cpp on Reddit: Devtoolset is a game changer for C++ development on Linux
March 23, 2018 -

On Linux the dependency on system compilers have always been frustrating since it means your stuck with ancient GCC versions. But I must say I'm very impressed with devtoolset for RHEL/CentOS, it means you can use gcc-7 on old crappy RHEL6 that so many large companies insist on using. And you can ship the resulting binaries and it will run on plain vanilla RHEL installations!

Top answer
1 of 5
12

what is devtoolset ?

2 of 5
6

devtoolset-7 also provides newer versions of lots of supporting debug and performance tools like gdb.

They (RH or Centos) also provide containerised versions of the build tools and the performance tools.

There is also a tech preview of the llvm-toolset, admittedly at clang v4 but still able to build those compatible binaries.

Note that you want to build using a host that is lower or same version as your minimum target version.

e.g. toolset-7 on host centos v6.7 will create bins compatible with 6.7, 6.9 and 7.x If your host is say centos 7.2 toolset-7 builds are only guaranteed to be compatible with v7.2+ targets.

Redhat's documentation is really good (and you can even get a free developer login to access more resources).

Also note that Centos provides similar options to RHEL.

The only downside is I don't think you can use the new ABI variant of CXX LIB as the ABI isn't compatible with older compilers like the default Centos gcc 4

Not really a problem as you can still use the C++11/14/17 features, just a few items are incompatible (such as list::size() still being O(n) and not const time, or strings still being COW)

https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/ (Lots of other tools/langs etc there too like Go,Rust,Python3 and lots of database updated versions etc.)

Not sure if you need to have a developer account, but an example of the documentation: https://access.redhat.com/documentation/en-us/red_hat_developer_toolset/7/html/7.0_release_notes/dts7.0_release

🌐
Abysm
blog.abysm.org › 2016 › 03 › installing-developer-toolset-rhel-based-distributions
Installing Developer Toolset on RHEL-based Distributions · Kuan-Yi Li's Blog
March 25, 2016 - yum install devtoolset-7 · yum install devtoolset-6 · yum install devtoolset-4 · yum install devtoolset-3 · Say you want to use Developer Toolset 8, you can run · scl enable devtoolset-10 bash · to invoke a BASH shell with environment variables setup to run Developer Toolset 10, check it yourself with ·
🌐
GitHub
github.com › sclorg › devtoolset-container › tree › master › 7-toolchain
devtoolset-container/7-toolchain at master · sclorg/devtoolset-container
Devtoolset container images based on Red Hat Software Collections, that provide a platform for building and running C and C++ applications. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
Author   sclorg