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 ... the collection: $ 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....
🌐
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: ...
🌐
Arritmies
arritmies.cat › update › devtoolset-7-gcc-c-devtoolset-7-gcc
devtoolset-7-gcc-c 和devtoolset-7-gcc下载
September 21, 2024 - Updated Compiler: Contains GCC 7, which supports C11 and C++14 standards. Isolation from System: Allows development without modifying system-wide toolchains. Easy Integration: Compatible with existing systems, requiring minimal changes to workflows.
🌐
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.).
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, ...
🌐
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 - In this example, we’ll install the Developer Toolset version 7. To do so type the following command on your CentOS 7 terminal: Terminal · sudo yum install devtoolset-7 · To access GCC version 7, you need to launch a new shell instance using ...
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_developer_toolset › 9 › html › user_guide › chap-gcc
Chapter 2. GNU Compiler Collection (GCC) | User Guide | Red Hat Developer Toolset | 9 | Red Hat Documentation
On Red Hat Enterprise Linux 7, the GCC C++ compiler still uses the old mangling by default, but emits aliases with the new mangling on targets that support strong aliases. It is possible to use the new standard mangling by adding the -fabi-version=4 option to compiler calls.
🌐
Red Hat
access.redhat.com › documentation › en-us › red_hat_developer_toolset › 12 › html-single › user_guide › index
User Guide | Red Hat Developer Toolset | 12 | Red Hat Documentation
May 9, 2023 - On Red Hat Enterprise Linux 7, the GCC C++ compiler still uses the old mangling by default, but emits aliases with the new mangling on targets that support strong aliases. It is possible to use the new standard mangling by adding the -fabi-version=4 option to compiler calls.
🌐
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 9. 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.