In your console output it says: Maybe run: yum groups mark install (see man yum)—did you do this?

Try running the following commands:

yum groups mark install "Development Tools"
yum groups mark convert "Development Tools"
yum groupinstall "Development Tools"

Reference: RedHat Customer Portal discussion

Answer from ThatsWhatSheCoded on Stack Exchange
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_developer_toolset › 11 › html-single › user_guide › index
User Guide | Red Hat Developer Toolset | 11 | Red Hat Documentation
$ scl enable devtoolset-11 'gcc -g -o fibonacci fibonacci.c' Copy to Clipboard Copied! ... This creates a new binary file called fibonacci in the current working directory. To install debugging information for a package that is already installed on the system: ... Copy to Clipboard Copied! ... Note that the yum-utils package must be installed for the debuginfo-install utility to be available on your system.
🌐
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: # yum install devtoolset-11-gdb-gdbserver devtoolset-11-gdb-doc
Discussions

yum -y install devtoolset-11-* failing with `No package devtoolset-11-* available.`
Hello @nealef, 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 ... More on github.com
🌐 github.com
3
January 29, 2022
mayeut/devtoolset-11 - Fedora Discussion
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. Contact the owner directly for bugs or issues (IE: not ... More on discussion.fedoraproject.org
🌐 discussion.fedoraproject.org
0
January 29, 2022
Where do I get "Development Tools" for CentOS 7 when trying to install via yum? - Unix & Linux Stack Exchange
I'm running CentOS 7. I want to install gcc (for the purposes of building Python 3 with the new openssl package I installed). I was reading here -- https://stackoverflow.com/questions/19816275/no- More on unix.stackexchange.com
🌐 unix.stackexchange.com
May 8, 2020
linux - How to permanently enable newer version of software installed from SCL repo? - Unix & Linux Stack Exchange
But source /opt/rh/gcc-toolset-11/enable works fine even in zsh. ... The above shell script scl_source is more elegant than using a hard coded path (may be different on another machine). However scl_source does less because /opt/rh/devtoolset-4/enable uses scl_source and other stuff. To use scl_source you may have to upgrade package scl-utils · yum ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
December 25, 2014
🌐
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. Simple reproducer: 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
🌐
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. Contact the owner directly for bugs or issues (IE: not bugzilla).
🌐
Centos
cbs.centos.org › koji › buildinfo
devtoolset-11-gcc-11.2.1-1.1.el7 | Build Info | CentOS Community Build Service
October 19, 2021 - Main Site Links: · Summary · Packages · Builds · Tasks · Build Targets · Users · Hosts · Reports · Search
🌐
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.
Top answer
1 of 5
93

In your ~/.bashrc or ~/.bash_profile Simply source the "enable" script provided with the devtoolset. For example, with the Devtoolset 2, the command is:

source /opt/rh/devtoolset-2/enable

or

source scl_source enable devtoolset-2

Lot more efficient: no forkbomb, no tricky shell

2 of 5
17

An alternative of source /opt/rh/devtoolset-4/enable is

source scl_source enable devtoolset-4

The above shell script scl_source is more elegant than using a hard coded path (may be different on another machine). However scl_source does less because /opt/rh/devtoolset-4/enable uses scl_source and other stuff.

To use scl_source you may have to upgrade package scl-utils

yum update scl-utils  # old scl-utils versions miss scl_source

Quick copy-paste

echo 'source scl_source enable devtoolset-4' >> ~/.bashrc
    # Do not forget to change the version ↑

Source code for curious people

An example of scl_source source code:
https://gist.github.com/bkabrda/6435016

The scl_source installed on my Red Hat 7.1

#!/bin/bash

_scl_source_help="Usage: source scl_source <action> [<collection> ...]

Don't use this script outside of SCL scriptlets!

Options:
    -h, --help    display this help and exit"

if [ $# -eq 0 -o $1 = "-h" -o $1 = "--help" ]; then
    echo "$_scl_source_help"
    return 0
fi


if [ -z "$_recursion" ]; then
    _recursion="false"
fi
if [ -z "$_scl_scriptlet_name" ]; then
    # The only allowed action in the case of recursion is the same
    # as was the original
    _scl_scriptlet_name=$1
fi
shift 1

if [ -z "$_scl_dir" ]; then
    # No need to re-define the directory twice
    _scl_dir=/etc/scl/conf
    if [ ! -e $_scl_dir ]; then
        _scl_dir=/etc/scl/prefixes
    fi
fi

for arg in "$@"; do
    _scl_prefix_file=$_scl_dir/$arg
    _scl_prefix=`cat $_scl_prefix_file 2> /dev/null`
    if [ $? -ne 0 ]; then
        echo "Can't read $_scl_prefix_file, $arg is probably not installed."
        return 1
    fi

    # First check if the collection is already in the list
    # of collections to be enabled
    for scl in ${_scls[@]}; do
        if [ $arg == $scl ]; then
            continue 2
        fi
    done

    # Now check if the collection isn't already enabled
    /usr/bin/scl_enabled $arg > /dev/null 2> /dev/null
    if [ $? -ne 0 ]; then
        _scls+=($arg)
        _scl_prefixes+=($_scl_prefix)
    fi;
done

if [ $_recursion == "false" ]; then
    _i=0
    _recursion="true"
    while [ $_i -lt ${#_scls[@]} ]; do
        _scl_scriptlet_path="${_scl_prefixes[$_i]}/${_scls[$_i]}/${_scl_scriptlet_name}"
        source "$_scl_scriptlet_path"
        if [ $? -ne 0 ]; then
            echo "Can't source $_scl_scriptlet_name, skipping."
        else
            export X_SCLS="${_scls[$_i]} $X_SCLS"
        fi;
        _i=$(($_i+1))
    done
    _scls=()
    _scl_prefixes=()
    _scl_scriptlet_name=""
    _recursion="false"
fi
Find elsewhere
🌐
Oracle Linux
yum.oracle.com › repo › OracleLinux › OL7 › SoftwareCollections › x86_64
Oracle Linux 7 (x86_64) Software Collection 3.0 | Oracle, Software. Hardware. Complete.
Oracle Linux with Oracle enterprise-class support is the best Linux operating system (OS) for your enterprise computing needs.
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

Top answer
1 of 3
9

From this answer to "Install gcc 4.7 on CentOS [6.x]", the easiest way to get g++ 4.7, and the required tools and libraries, for CentOS 5.x is via the devtools package:

cd /etc/yum.repos.d
wget http://people.centos.org/tru/devtools/devtools.repo 
yum --enablerepo=testing-devtools-6 install devtoolset-1.0

Since you're running g++ manually (as opposed to through make), you'll need to update your $PATH variable so your shell will use the new gcc, g++, etc. binaries:

export PATH=/opt/centos/devtoolset-1.0/root/usr/bin/:$PATH

At this point, your g++ should be version 4.7.0

$ g++ --version
g++ (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Be aware that installing gcc and associated tools and libraries in this manner relies on the repository maintainer to keep their packages up to date.

If you're interested in keeping your gcc up to date, you may want to consider building gcc from source.

Also, compiling programs with a different version of g++ and libstdc++ than are installed on your system can cause all kinds of Fun, coping with which is beyond the scope of this answer. It may be worth moving to a Linux distribution that has support for what you're doing.

2 of 3
1

Package managers are great, but (understandably) won't generally include the latest version of software. CentOS being a distribution particularly focusing on servers, favors stability (and extensive testing) over having the latest and shiniest. Here are your solutions:

Change distro

Other distributions like Arch Linux, Sabayon Linux or Debian "Sid" include newest versions a lot faster. You may consider changing distros.

Build it yourself

If you're stuck with CentOS, your best bet is to build gcc from source. It means getting the source code, making sure the dependencies are already present on your system (if not, I'm sure you can get them from the CentOS package manager), compiling the source into a binary executable, and installing the executable on your system.

It's not the easiest way to do it for sure, but you'll learn a lot about Unix in the process. Make sure to read the document a few times to make sure you get everything, and ask questions if something specific is unclear.

Be patient

At some point, this version (or newer) of gcc/g++ is going to enter the package manager. If you wait (up to several months, I'm not very familiar with the CentOS release cycle), you'll ultimately get what you want.

🌐
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 - [srv@local ~]# yum install devtoolset-7-gcc* Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.crazyfrogs.org * extras: centos.quelquesmots.fr * updates: centos.mirror.fr.planethoster.net centos-sclo-rh | 3.0 kB 00:00:00 centos-sclo-sclo | 2.9 kB 00:00:00 (1/2): centos-sclo-sclo/x86_64/primary_db | 281 kB 00:00:00 (2/2): centos-sclo-rh/x86_64/primary_db | 3.5 MB 00:00:03 Resolving Dependencies --> Running transaction check ---> Package devtoolset-7-gcc.x86_64 0:7.3.1-5.4.el7 will be installed --> Processing Dependency: glibc-devel >= 2.2.90-12 for package:
🌐
CERN
linuxsoft.cern.ch › cern › centos › 7 › sclo › x86_64 › rh › repoview › devtoolset-11-libasan-devel.html
devtoolset-11-libasan-devel
CentOS 7 - SCL for x86_64: unspecified: devtoolset-11-libasan-devel · Jump to letter: [ CDGHLMNPRSTV ]
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_developer_toolset › 12 › html-single › user_guide › index
User Guide | Red Hat Developer Toolset | 12 | Red Hat Documentation
Consider the employee file from Example 11.1, “Using memstomp”. Run the strace utility on this executable file and trace only the mmap and munmap system calls: $ scl enable devtoolset-12 'strace -e mmap,munmap ./employee' mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f896c744000 mmap(NULL, 61239, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f896c735000 mmap(0x3146a00000, 3745960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3146a00000 mmap(0x3146d89000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x189000) = 0x3146d89000 mmap(0x31
🌐
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-10 · yum install devtoolset-9 · yum install devtoolset-8 · yum install devtoolset-7 · yum install devtoolset-6 · yum install devtoolset-4 · yum install devtoolset-3 · Say you want to use Developer Toolset 8, you can run · scl enable devtoolset-10 bash ·
🌐
Stack Overflow
stackoverflow.com › tags › devtoolset › hot
Hottest 'devtoolset' Answers - Stack Overflow
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. ... the final binary is missing some symbols That looks like a bug in devtoolset-1-gcc, which I assume has been fixed in more recent versions of devtoolset. Interestingly, the libstdc++ from devtoolset ... ... While Devtoolset-3 and 4 are located on the Centos mirror site, yum will not be able to find them as they were not included in the repodata on the site.