Install it by:

sudo yum install centos-release-scl
sudo yum install devtoolset-4

The first command installs and enables Software Collections Repository on your CentOS machine. That repository provides the devtoolset package.

Answer from 13dimitar on Stack Exchange
🌐
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.
🌐
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 - It seems that devtoolset-11 has not been rebuild yet for clefos 7. Is this planned and if so, do you have an ETA on this ? 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.
Author   nealef
Discussions

g++ - How can I install devtoolset on the workstation edition of RHEL7 - Stack Overflow
I would like to know how to install devtoolset on RHEL7 workstation. I found instructions for RHEL7 server which I have failed to adjust correctly for the workstation edition. I also found instruc... More on stackoverflow.com
🌐 stackoverflow.com
linux - Can not find required gcc version after devtoolset installation - Stack Overflow
If I run yum list installed | grep devtoolset, it shows packages related to devtoolset-8 and devtoolset-7. But I can not switch to gcc 7 or 8 because of that previous error. If I run scl enable devtoolset-9 -- bash, it does not change to the gcc version, stays at the default gcc. More on stackoverflow.com
🌐 stackoverflow.com
linux - How to install gcc8 using devtoolset-8-gcc - Stack Overflow
I am looking for a way to install ... devtoolset-7-gcc*). I did follow the guidelines and was able to install gcc v7. Though, if I followed the same procedure, but used "devtoolset-8-gcc*" instead the return message states "No package devtoolset-8-gcc* available.".... More on stackoverflow.com
🌐 stackoverflow.com
Install Obsolete Devtoolset Collection for CentOS - Stack Overflow
At present time Devtoolset-5 (and ... and 7 are available). Nevertheless, this collection can be downloaded as a list of rpm-packages. Is it possible to enable such EOL collections for yum, or maybe there is another way to install them correctly? ... While Devtoolset-3 and 4 are located on the Centos mirror site, yum will not be able to ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
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.
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

🌐
Oracle Communities
community.oracle.com › tech › apps-infra › discussion › 4493920 › install-devtoolset-7-failing-on-oracle-enterprise-linux-7
install devtoolset-7 failing on Oracle Enterprise Linux 7 - Oracle Forums
January 31, 2022 - Getting below error when trying installation of devtoolset -7 [root@1d30dc6c8d22 ~]# yum install devtoolset-7-gcc-c++ Loaded plugins: ovl, ulninfo http://packages/mirror/EPEL/...
Find elsewhere
🌐
CentOS Repositories
centos.pkgs.org › 7 › centos-sclo-rh-testing-x86_64 › devtoolset-7-7.0-8.el7.x86_64.rpm.html
devtoolset-7-7.0-8.el7.x86_64.rpm CentOS 7 Download
This is the main package for devtoolset-7 Software Collection. ... 2017-10-06 - Marek Polacek <polacek@redhat.com> - 7.0-8 - don't Require gcc for dockerfiles (#1499232) 2017-08-24 - Marek Polacek <polacek@redhat.com> - 7.0-7 - drop devtoolset-7-{all,go,llvm,rust} 2017-08-08 - Marek Polacek <polacek@redhat.com> - 7.0-6 - update dockerfiles · 2017-07-03 - Marek Polacek <polacek@redhat.com> - 7.0-5 - the Go toolset is not available on ppc64 (#1466198)
🌐
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: ...
🌐
Google Groups
groups.google.com › g › vfx-platform-discuss › c › _-_CPw1fD3c › m › o37g5jD7AwAJ
Removal of Devtoolset-6 from CentOS 7.7
September 17, 2019 - As was mentioned on the CentOS ... http://mirror.centos.org/centos-7/7.6.1810/sclo/x86_64/rh/devtoolset-6/ If you upgrade to CentOS 7.7, you will not see devtoolset-6 as available, only devtoolset-7/8....
🌐
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-config-manager --enable rhel-server-rhscl-7-rpms · yum-config-manager --enable rhel-server-rhscl-6-rpms · yum install centos-release-scl · yum install yum-conf-repos yum install yum-conf-softwarecollections · yum install "http://ftp.scientificlinux.org/linux/scientific/6/external_products/softwarecollections/yum-conf-softwarecollections-2.0-1.el6.noarch.rpm" Install the version(s) of your choice. Yes, they can co-exist. yum install devtoolset-10 ·
🌐
Cisco Community
community.cisco.com › t5 › tools › devtoolset-4-gcc-not-available-for-centos-7-9 › td-p › 4431796
Solved: devtoolset-4-gcc* not available for CentOS 7.9 - Cisco Community
July 13, 2021 - Loading mirror speeds from cached hostfile * base: mirror.datto.com * centos-sclo-rh: repo.ialab.dsu.edu * centos-sclo-sclo: mirrors.vcea.wsu.edu * extras: ftpmirror.your.org * updates: ftpmirror.your.org No package devtoolset-4-gcc* available. Error: Nothing to do ... Solved! Go to Solution. ... The documentation under ydk.cisco.com references YDK release 0.8.3, which is significantly outdated. I strongly suggest you to move to the latest publicly available release 0.8.5.2, which you can find here. It includes YDK installation script, which will take care of all the dependencies needed for your CentOS-7.9 platform.
🌐
LinuxQuestions.org
linuxquestions.org › questions › red-hat-31 › devtoolset-4175659144
Devtoolset
August 14, 2019 - Hello! Am trying to download gcc 8.2 for rhel 7.7 using the url below, https://developers.redhat.com/produc...#fndtn-windows keep getting error
🌐
Red Hat
access.redhat.com › discussions › 2518201
How to install devtoolset-4 - Red Hat Customer Portal
June 15, 2017 - Hi I have a problem to install the Red Hat Developer Toolset, I have tried the following command # yum install devtoolset-x with x=1.1, 2, 3, 4, But i get always the same answer : No package devtoolset-4 available. I know that I should enable the optional channel, and I have enabled almost ...