I am using CentOS 7.9 and I encountered the same problem after following instructions here to install and run gcc 11. I tried launching different versions of gcc and found only devtoolset-9 works, which corresponds to the file devtoolset-9 in /etc/scl/conf/ folder. So I copied devtoolset-9 to devtoolset-11 in the same folder, and gcc 11 gets working.

Answer from zzzhhh on Stack Overflow
🌐
Softwarecollections
softwarecollections.org › en › scls › rhscl › devtoolset-7
Developer Toolset 7 — Software Collections
# 1. Install a package with repository ... $ sudo yum install devtoolset-7 # 3. Start using software collections: $ scl enable devtoolset-7 bash · At this point you should be able to use gcc and other tools just as a normal application....
Discussions

Install devtoolset-7 on Rocky
I recently changed from CentOS 7 (GCC version 7.3.1.) to Rocky 8.5 (GCC version 8.5.0). When I compile C++ code with GCC on Rocky and want to execute it on another system with CentOS 7 I get the following errors: ./program: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required ... More on forums.rockylinux.org
🌐 forums.rockylinux.org
9
0
January 13, 2022
gcc - how to install gcc7 in docker centos7 - Stack Overflow
Pre-built binaries are by definition ... maybe building the GCC7 source rpms on CentOS7 will do the trick. ... This solution takes a long time and my console returns an error then stop. ... RUN yum install -y centos-release-scl RUN yum install -y devtoolset-7-gcc-* RUN echo "source ... More on stackoverflow.com
🌐 stackoverflow.com
July 18, 2019
g++ - How can I install devtoolset on the workstation edition of RHEL7 - Stack Overflow
In fact I have had later versions of gcc self-compiled for RHEL7 for many years. These however use a later version of libstdc++ and the 'new' ABI (see Forcing or preventing use of a particular minor version of libstdc++). I do not wish to do that for this case and I want to follow proper 'vendor' instructions rather than compiling from source. ... "devtoolset" → Probably yum-config-manager --enable rhel-server-rhscl-7... More on stackoverflow.com
🌐 stackoverflow.com
c++ - Build Devtoolset 7 gcc with "--enable-vtable-verify" - Stack Overflow
I have devtoolset7 packages installed in my machine devtoolset-7-binutils-devel-2.28-11.el7.x86_64 devtoolset-7-runtime-7.1-4.el7.x86_64 devtoolset-7-binutils-2.28-11.el7.x86_64 devtoolset-7-gdb-... More on stackoverflow.com
🌐 stackoverflow.com
October 13, 2018
🌐
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.
🌐
Rocky Linux Forum
forums.rockylinux.org › rocky linux help & support
Install devtoolset-7 on Rocky - Rocky Linux Help & Support - Rocky Linux Forum
January 13, 2022 - I recently changed from CentOS 7 (GCC version 7.3.1.) to Rocky 8.5 (GCC version 8.5.0). When I compile C++ code with GCC on Rocky and want to execute it on another system with CentOS 7 I get the following errors: ./program: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./program) ./program: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./program) ./program: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./program) ./program: ...
Find elsewhere
🌐
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, ...
🌐
Red Hat
developers.redhat.com › blog › 2019 › 06 › 20 › developer-toolset-8-1-and-gcc-8-3-now-available-for-red-hat-enterprise-linux-7
Developer Toolset 8.1 and GCC 8.3 now available for Red Hat Enterprise Linux 7 | Red Hat Developer
March 28, 2023 - We are pleased to share that Developer Toolset 8.1 with GCC 8.3 is now available and supported on Red Hat Enterprise Linux 7. The Red Hat Developer Toolset 8.1 release includes many enhancements and changes, but here are a few of the highlights: ...
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

🌐
Docker Hub
hub.docker.com › r › centos › devtoolset-7-toolchain-centos7
centos/devtoolset-7-toolchain-centos7 - Docker Image
Docker container based on CentOS packagess is available as centos/devtoolset-7-toolchain-centos7 in the Docker Hub. Developer Toolset from Red Hat Software Collections provides various tools for C and C++ developers, so they are able to use the Developer Toolset tools without needing to be running a RHEL host. The Toolchain part of the Developer Toolset contains tools for building such applications (GCC compiler for C and C++, GDB, gfortran compiler, etc.).
🌐
NVIDIA Developer Forums
forums.developer.nvidia.com › accelerated computing › cuda › cuda programming and performance
RHEL Centos 7.5 with devtoolset-7 (gcc V 7.3.1) and CUDA toolkit V 10.0.130 compile issue - CUDA Programming and Performance - NVIDIA Developer Forums
December 1, 2018 - Dear NVidia CUDA Toolkit Support, I am using Centos 7.5 and I am trying to build SuiteSparse V 5.3.0 rpms using TBB and CUDA support using the devtoolset-7, which provides gcc V 7.3.1. It builds with the default gcc 4.…
🌐
Red Hat
access.redhat.com › discussions › 3517861
Red Hat Customer Portal - Access to 24x7 support and knowledge
July 4, 2018 - Hello, I want to yum install devtoolset-7-7.0-8.el7 on Red Hat Enterprise Server 7.4 but get the message Package devtoolset-7 is obsoleted by devtoolset-7, trying to install devtoolset-7-7.1-4.el7.x86_64 instead In the package devtoolset-7 is e.g. devtoolset-7-gcc x86_64 7.3.1-5.10.el7
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_enterprise_linux › 8 › html › developing_c_and_cpp_applications_in_rhel_8 › additional-toolsets-for-development_developing-applications
Chapter 4. Additional toolsets for development | Developing C and C++ applications in RHEL 8 | Red Hat Enterprise Linux | 8 | Red Hat Documentation
This language standard is available in the GCC Toolset 11. Binaries, shared libraries and objects built using this standard can be freely mixed regardless of being built with GCC from the GCC Toolset, Red Hat Developer Toolset, and RHEL 5, 6, 7 and 8.
🌐
Linuxize
linuxize.com › home › gcc › how to install gcc compiler on centos 7
How to Install GCC Compiler on CentOS 7 | Linuxize
October 31, 2019 - sudo yum install devtoolset-7 · To access GCC version 7, you need to launch a new shell instance using the Software Collection scl tool: Terminal · scl enable devtoolset-7 bash · Now if you check the GCC version, you’ll notice that GCC 7 is the default version in your current shell: Terminal ·