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
🌐
Softwarecollections
softwarecollections.org › en › scls › rhscl › devtoolset-7
Developer Toolset 7 — Software Collections
devtoolset-7 - Developer Toolset is designed for developers working on CentOS or Red Hat Enterprise Linux platform.
🌐
Docker Hub
hub.docker.com › r › centos › devtoolset-7-toolchain-centos7
centos/devtoolset-7-toolchain-centos7 - Docker Image
FROM rhscl/devtoolset-7-toolchain-rhel7 USER 0 RUN yum install -y --setopt=tsflags=nodocs boost-devel && yum clean all -y USER 1001 Copy
🌐
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, 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

🌐
Centos
lists.centos.org › hyperkitty › list › announce@lists.centos.org › thread › 2APH7YUSNGVRJD5LAXBI46BBB5AKWHZZ
Announcing release of Developer Toolset 7 on CentOS Linux 7 x86_64 SCL - announce - lists.centos.org
I am pleased to announce the immediate availability of Developer Toolset in version 7 on CentOS Linux 7 x86_64, delivered via a Software Collection (SCL) built by the SCLo Special Interest Group (https://wiki.centos.org/SpecialInterestGroup/SCLo). QuickStart ---------- You can get started in three easy steps: $ sudo yum install centos-release-scl $ sudo yum install devtoolset-7 $ scl enable devtoolset-7 bash
🌐
Softwarecollections
softwarecollections.org › en › scls › rhscl › devtoolset-8
Developer Toolset 8 — Software Collections
$ sudo yum install centos-release-scl-rh $ sudo yum-config-manager --enable centos-sclo-rh-testing $ sudo yum install devtoolset-8 · On CentOS 7 and RHEL 7 you can pull the images with the following commands:
Find elsewhere
🌐
Google Groups
groups.google.com › g › vfx-platform-discuss › c › _-_CPw1fD3c
Removal of Devtoolset-6 from CentOS 7.7
> > RUN yum install -y devtoolset-6 > See also this CentOS forum topic about missing devtoolkit-6 > > > On Wednesday, 18 September 2019 14:24:37 UTC+1, Aloys Baillet wrote:After some trial and error I have this method to install devtoolset-6 on CentOS-7.7:Add a repo file:/etc/yum.repos.d/devtoolset.repo > > [centos-sclo-rh]name=CentOS-7 - SCLo rhbaseurl=http://mirror.centos.org/centos-7/7.6.1810/sclo/$basearch/rh/enabled=1 > thenyum install devtoolset-6-toolchain > works...But I'm expecting that the mirror data will probably disappear soon and we'll have to switch to the vault (which doesn't have 7.6.1810 packages yet).
🌐
Docker
hub.docker.com › layers › centos › devtoolset-7-toolchain-centos7 › latest › images › sha256-24d4c230cb1fe8e68cefe068458f52f69a1915dd6f6c3ad18aa37c2b8fa3e4e1
centos/devtoolset-7-toolchain-centos7:latest
Welcome to the world's largest container registry built for developers and open source contributors to find, use, and share their container images. Build, push and pull.
🌐
Centos
buildlogs.centos.org › c7-devtoolset-7.armhfp
Index of /c7-devtoolset-7.armhfp
This server contains a mix of raw/unsigned packages and/or build logs It should be used mainly for testing purposes
Top answer
1 of 2
16

I've confirmed that you can upgrade gcc from the default version 4.8 on centOS 7.

First, we need to install "Software Collections" in order to access some of the community packages including gcc v7

  • sudo yum install -y centos-release-scl

Next, we want to install a developer toolset. Depending on your needs, you may want a different devtoolset. Here I'm targeting 7:

  • sudo yum install -y devtoolset-7

Finally, you'll want to change over to gcc 7 as your default, launch a new shell session with the scl tool:

  • scl enable devtoolset-7 bash
2 of 2
1

Enable the software collection in the answer is only effective in the current shell. The scl utility will create a "child-shell" that set the PATH variables properly, so that in the new child-shell, the enabled software collections will be firstly searched. These settings obviously only take effective temporarily in the current shell.

To make it permanently effective, add the command, source /opt/rh/devtoolset-7/enable to the user's profile (~/.bash_profile or ~/.bashrc for RHEL based OS, like CentOS 7). Then, start a new shell and you will have the right tools available.

After execute scl enable devtoolset-7 bash, you will need to execute exit twice to exit the opened shell window, which verifies that the scl command created a new shell instance as a child process. There might be side-effect with creating a child-shell, so do not put this command in the ~/.bashrc profile, otherwise it will repeatedly create child-shell (non-login shell) as each shell will load the profile, resulting in a endless recursive loop. Put it in ~/.bash_profile, it will be loaded for only once (for the login shell), but you will need to exit twice every time.

But for development purpose, scl enable devtoolset-7 bash would be preferred, as you can exit the created child-shell, and then switch between different versions of the same software.


More details about the GCC version in python terminal:

The version info of the built-in Python in CentOS 7:

[root@conda condabuilder]# python
Python 2.7.5 (default, Nov 16 2020, 22:23:17) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

The version info of the user installed (via conda) Python on a system even without higher version of GCC installed:

[root@conda condabuilder]# conda activate jupyter
(jupyter) [root@conda condabuilder]# python -VV
Python 3.10.9 | packaged by conda-forge | (main, Feb  2 2023, 20:20:04) [GCC 11.3.0]

From the results, we can see that the GCC version contained in Python's version info is not related to the system's GCC. The system's default Python (2.7.5) should have been compiled with the GCC version distributed with CentOS 7, so the version info show the same GCC version. But for user installed python, the GCC version info actually depends on what version of GCC is used for building and packging the python binary.

🌐
CERN
linuxsoft.cern.ch › cern › centos › 7 › sclo › x86_64 › rh › repoview › development.tools.group.html
CentOS 7 - SCL for x86_64: development/tools
devtoolset-7-binutils - A GNU collection of binary utilities · devtoolset-7-dwz - DWARF optimization and duplicate removal tool · devtoolset-7-elfutils - A collection of utilities and DSOs to handle ELF files and DWARF data · devtoolset-7-elfutils-devel - Development libraries to handle ...
🌐
Docker Hub
hub.docker.com › r › centos › devtoolset-6-toolchain-centos7
centos/devtoolset-6-toolchain-centos7 - Docker Image
docker run -ti --rm -v /src/app:/opt/app-root/src:z rhscl/devtoolset-6-toolchain-rhel7 bash bash-4.3$ gcc -o foo -ggdb -g2 foo.c Copy
🌐
Centos
buildlogs.centos.org › c6-devtoolset-7.x86_64 › Packages
Index of /c6-devtoolset-7.x86_64/Packages
This server contains a mix of raw/unsigned packages and/or build logs It should be used mainly for testing purposes
🌐
Centos
buildlogs.centos.org › c7-devtoolset-7.x86_64
Index of /c7-devtoolset-7.x86_64 - CentOS Buildlogs Mirror
This server contains a mix of raw/unsigned packages and/or build logs It should be used mainly for testing purposes