Since the package is either not available, or using a different name, the first step is to find which is the case. Use

yum list available |grep gcc
yum list available |grep devtoolset

to find whether you have misspelled the package name, or if gcc is available under a different name. Check using yum info for the package. Its description should show the relevant version information.

According to Red Hat's article What gcc versions are available in Red Hat Enterprise Linux?, gcc 4.8 is available for Red Hat Enterprise 7. If you need gcc 4.8 for RHEL 6, you may have to compile it yourself.

Further reading:

  • Installing GCC 4.8.2 on Red Hat Enterprise linux 6.5
  • How to Install gcc 4.7.x/4.8.x on CentOS
  • install latest gcc on rhel 6 x86_64
Answer from Thomas Dickey on Stack Exchange
🌐
Stack Overflow
stackoverflow.com › questions › 51661630 › devtoolset-3-not-found-on-centos-6
centos6 - devtoolset-3 not found on Centos 6 - Stack Overflow
This failed all of a sudden. Anyone know how to circumvent it? Thanks. [cktan@ckrh6 ~]$ sudo yum install -y devtoolset-3 Loaded plugins: fastestmirror, security Setting up Install Process Load...
🌐
Red Hat
bugzilla.redhat.com › show_bug.cgi
1825374 – devtoolset-3-gcc no longer available
Red Hat Bugzilla – Bug 1825374 · This site requires JavaScript to be enabled to function correctly, please enable it · Privacy Contact FAQ Legal
Discussions

linux - Can not find required gcc version after devtoolset installation - Stack Overflow
I am using Centos 7 with kernel 3.10.0 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 ... More on stackoverflow.com
🌐 stackoverflow.com
gcc - How can we install devtoolset-4.0 on CentOS 6.7 - Unix & Linux Stack Exchange
However, I got No package devtoolset-4 available. ... If you just want g++ and its dependencies: After adding the SCL repos as in @13nilux's answer, you may want to install devtoolset-4-toolchain (22 packages including binutils and gcc-c++) rather than devtoolset-4 (278 packages including the ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
March 22, 2017
CentOS 6 and Devtoolset-3 - Unix & Linux Stack Exchange
Trying to install C++ from Devtoolset-3 to my CentOS6 system I've ran into dependencies problem: bash-4.2# yum install devtoolset-3-gcc-c++ Loaded plugins: fastestmirror Loading mirror speeds from More on unix.stackexchange.com
🌐 unix.stackexchange.com
Install Obsolete Devtoolset Collection for CentOS - Stack Overflow
How to make them available through the yum? 2018-08-07T17:24:30.49Z+00:00 ... That mirror no longer works. 2024-06-13T18:55:59.847Z+00:00 ... It's now under vault.centos.org/centos/6/sclo/x86_64/rh because CentOS 6 has been EOL for a couple of years. 2024-06-14T05:43:31.383Z+00:00 ... Find the answer to your question by asking. Ask question ... See similar questions with these tags. ... 7 CentOS: Using GCC 4.7 from devtoolset ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Stack Exchange
unix.stackexchange.com › questions › 266065 › centos-6-and-devtoolset-3
CentOS 6 and Devtoolset-3 - Unix & Linux Stack Exchange
No that is default install and I didn't do anything w/ yum configs... ... Something is different on your machine from "default". I just spun up a CentOS 6 docker container, installed centos-release-scl, then installed devtoolset-3-gcc-c++ without issue.
Find elsewhere
🌐
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
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-9 '/usr/lib64/ccache/gcc -c foo.c'
🌐
Red Hat
access.redhat.com › discussions › 3104201
Red Hat Customer Portal - Access to 24x7 support and knowledge
However 'yum search devtoolset' yields no results, and 'yum install devtoolset-6' fails with "No package devtoolset-6 available".
🌐
LinuxQuestions.org
linuxquestions.org › questions › centos-111 › after-updates-configure-can't-find-devtoolset-gcc-4175533061
[SOLVED] after updates configure can't find devtoolset gcc
February 4, 2015 - After allowing updates on centos 6.5, hp printer no longer works. The hplip configure returns the following: [root@q hplip-3.14.10]# ./configure
Top answer
1 of 4
22
yum install centos-release-scl-rh
yum install devtoolset-3-gcc devtoolset-3-gcc-c++
update-alternatives --install /usr/bin/gcc-4.9 gcc-4.9 /opt/rh/devtoolset-3/root/usr/bin/gcc 10
update-alternatives --install /usr/bin/g++-4.9 g++-4.9 /opt/rh/devtoolset-3/root/usr/bin/g++ 10
2 of 4
21

For installing the system compilers gcc, g++, the install command is # yum install gcc-c++ → Provides version 4.8.5 : /usr/bin/{ gcc, g++ }.

Other options: 1. gcc53-c++-5.3.0-1.el6.x86_64.rpm → https://drive.google.com/file/d/0B7S255p3kFXNRm9FVnZYUnhyZzg/view?usp=sharing&resourcekey=0-1N6zQa6Sbl_WycG1O9I7JA : Download and install : # cd Downloads/ && yum install ./gcc53-c++-5.3.0-1.el6.x86_64.rpm ..... Provides /usr/bin/{gcc53, g++53}.

  1. The devtoolset´s : https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/ → # yum-config-manager --enable rhel-server-rhscl-7-rpms

Install gcc, g++ version 4.9.2 : # yum install devtoolset-3-gcc-c++

Note : You can have as many gcc/g++ versions as you want, installed at the same time. ( The system compilers are a must.)


  1. gcc49-c++-4.9.3-1.el6.x86_64.rpm https://drive.google.com/file/d/1Pwq1ua80dGM72i7rpDNAIIdfcR1WK-hG/view?usp=sharing → Provides /usr/bin/{gcc49, g++49}.

  1. gcc63-c++-6.3.0-1.el7.x86_64.rpm https://drive.google.com/file/d/1t4WrgvpEP-6_NN3qMJhz9MS3CJhHrHKc/view?usp=sharing → Provides /usr/bin/{gcc63, g++63}.

  2. gcc45-c++-4.5.4-1.el7.x86_64.rpm https://drive.google.com/file/d/15aRg-BPhuyaEyZA9Jy-iAyC21_pwN7nD/view?usp=sharing → Provides /usr/bin/{gcc45, g++45, gfortran45}

  3. gcc42-c++-4.2.4-1.el6.x86_64.rpm https://drive.google.com/file/d/1eYWk6Nd63xeqqAUoJldNWRuwEGO6cAyv/view?usp=sharing → Provides /usr/bin/{gcc42, g++42}


  1. gcc73-c++-7.3.0-1.el7.x86_64.rpm https://drive.google.com/file/d/1PgwCP5tu8D0EJbJVTqJd7Vg8dJ4l4noi/view?usp=sharing → Provides /usr/bin/{gcc73, g++73}

  2. gcc48-c++-4.8.5-1.el6.x86_64.rpm https://drive.google.com/file/d/1w6fW6oSflDDYZt_cOpGj3QMEmzUC8Q9L/view?usp=sharing → Provides /usr/bin/{gcc48, g++48, gfortran48}

  3. gcc84-c++-8.4.0-1.el7.x86_64.rpm https://drive.google.com/file/d/1xgFtsiDi2uiB1B0AcOaSpxVizzET-pJf/view?usp=sharing → Provides /usr/bin/{gcc84, g++84, gfortran84}

🌐
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-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 · gcc --version · Product Documentation for Red Hat Developer Toolset ·
🌐
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.
🌐
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: ...