To use recent versions of compilers such as gcc 11 on centos stream, install the gcc toolsets, eg gcc-toolset-11 which is in the AppStream repos.

Answer from jiopaley on Stack Overflow
🌐
Rocky Linux Forum
forums.rockylinux.org › rocky linux help & support
How to install devtoolset-11-gcc-c++ \ - Rocky Linux Help & Support - Rocky Linux Forum
January 3, 2025 - Hello, Im having a hard time installing devtoolset-11-gcc-c++ on Rocky Linux 9. Can someone help me install it? thanks
🌐
GitHub
github.com › nealef › clefos › issues › 9
yum -y install devtoolset-11-* failing with `No package devtoolset-11-* available.` · Issue #9 · nealef/clefos
January 29, 2022 - This has been found when investigating pypa/manylinux#1266 CentOS 7 sources are available for devtoolset-11: https://vault.centos.org/centos/7/sclo/Source/rh/ The CentOS 7 x86_64 image is able to run the same commands as below successfully. ... docker pull s390x/clefos:7 docker run -it --rm s390x/clefos:7 echo "multilib_policy=best" >> /etc/yum.conf echo "skip_missing_names_on_install=False" >> /etc/yum.conf sed -i '/^override_install_langs=/d' /etc/yum.conf yum -y update yum -y install yum-utils curl yum-config-manager --enable extras yum -y install centos-release-scl-rh yum -y install devtoolset-11-binutils devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran
Author   nealef
🌐
Red Hat
access.redhat.com › documentation › en-us › red_hat_developer_toolset › 11 › html-single › 11.0_release_notes › index
11.0 Release Notes | Red Hat Developer Toolset | 11 | Red Hat Documentation
November 15, 2021 - Note that error messages related to a missing libitm library when using the -fgnu-tm option require the libitm package to be installed. You can install the package with the following command: ... To use the ccache utility with GCC included in Red Hat Developer Toolset, set your environment correctly. For example: ~]$ scl enable devtoolset-11 '/usr/lib64/ccache/gcc -c foo.c'
🌐
Red Hat
access.redhat.com › documentation › en-us › red_hat_developer_toolset › 11 › html-single › user_guide › index
User Guide | Red Hat Developer Toolset | 11 | Red Hat Documentation
July 19, 2023 - In Red Hat Developer Toolset, the GNU C++ compiler is provided by the devtoolset-11-gcc-c++ package and is automatically installed with the devtoolset-11-toolchain package as described in Section 1.5, “Installing Red Hat Developer Toolset”.
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_developer_toolset › 11 › html › user_guide › chap-red_hat_developer_toolset
Chapter 1. Red Hat Developer Toolset | User Guide | Red Hat Developer Toolset | 11 | Red Hat Documentation
Replace package_name with a space-separated list of packages that you want to install. For example, to install the devtoolset-11-gdb-gdbserver and devtoolset-11-gdb-doc packages:
Find elsewhere
🌐
Fedora Discussion
discussion.fedoraproject.org › team workflows › projects in copr
mayeut/devtoolset-11 - Fedora Discussion
January 29, 2022 - Description devtoolset-11 rebuild for centos 7 i686 Installation Instructions yum install devtoolset-11-binutils devtoolset-11-gcc [...] Active Releases The following unofficial repositories are provided as-is by owner of this project.
🌐
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 - Because using such a package with multiple complex packages you must configure multiple environment and links to the versions you installed replacing the ones from your base system, but the package comes with a handy tool, which executing it will configure everything and you are ready to go! ... 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.
🌐
Fedora
copr.fedorainfracloud.org › coprs › mayeut › devtoolset-11
mayeut/devtoolset-11 Copr
devtoolset-11 rebuild for centos 7 i686 · yum install devtoolset-11-binutils devtoolset-11-gcc [...] The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla). * Total number of downloaded packages.
🌐
Red Hat
access.redhat.com › documentation › en-us › red_hat_developer_toolset › 11
Red Hat Developer Toolset | 11 | Red Hat Documentation
Release Notes for Red Hat Developer Toolset 11.0 · Installing and Using Red Hat Developer Toolset · Github · Youtube · Twitter · Developer resources · Cloud learning hub · Interactive labs · Training and certification · Customer support · See all documentation ·
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

🌐
Red Hat
bugzilla.redhat.com › show_bug.cgi
1946794 – Add new collection devtoolset-11
July 8, 2021 - Red Hat Bugzilla – Bug 1946794 · This site requires JavaScript to be enabled to function correctly, please enable it · Privacy Contact FAQ Legal
🌐
Linux @ CERN
linux.web.cern.ch › devtoolset
Developer Toolset - Linux @ CERN
$ scl enable devtoolset-1.1 bash $ gcc --version gcc (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5) Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions.