You should be able to just do yum install gcc-c++ if the repos are set up. Give that a try first (you can see what repos are installed with yum repolist).

Answer from apenney on Stack Exchange
Discussions

How to install GCC/G++ 8 on CentOS - Stack Overflow
I'm used to install packages on Debian/Ubuntu distributions, but now I need to install gcc and g++ version 8.*. There is only version 4.* in CentOS repositories. What's the correct way to install t... More on stackoverflow.com
🌐 stackoverflow.com
software installation - Install GCC 4.8+ on rhel x86_64 workstation 6 - Unix & Linux Stack Exchange
I want to install gcc 4.8+, preferrably 4.9 on my Red Hat Enterprise Linux Workstation release 6.7 (santiago) I have a subscription to rhn-classic. I tried installing devtoolset as given in https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3/html/User_Guide/sect-Red_H... More on unix.stackexchange.com
🌐 unix.stackexchange.com
Unable to install openmpi on RedHat 8.6 system
Keep getting: No match for argument: openmpi Error: Unable to find a match: openmpi or: No match for argument: openmpi-devel Error: Unable to find a… More on reddit.com
🌐 r/HPC
10
1
September 9, 2024
Serious vulnerability fixed with OpenSSH 9.8
A critical vulnerability in sshd(8) was present in Portable OpenSSH versions between 8.5p1 and 9.7p1 (inclusive) that may allow arbitrary code execution with root privileges. Successful exploitation has been demonstrated on 32-bit Linux/glibc systems with ASLR. Under lab conditions, the attack requires on average 6-8 hours of continuous connections up to the maximum the server will accept. Exploitation on 64-bit systems is believed to be possible but has not been demonstrated at this time. It's likely that these attacks will be improved upon. that's a slow ass exploit for lab conditions. I'm guessing fail2ban would avoid this risk More on reddit.com
🌐 r/linux
31
173
July 1, 2024
🌐
LinuxConfig
linuxconfig.org › home › how to install gcc the c compiler on rhel 8 / centos 8
How to install GCC the C compiler on RHEL 8 / CentOS 8
September 24, 2019 - The GCC compiler can be installed in RHEL 8 by simply using the dnf install command.
🌐
Red Hat
access.redhat.com › discussions › 4560881
Red Hat Customer Portal - Access to 24x7 support and knowledge
Looks like the latest RHEL 8.0 comes with only GCC 8.2. I have application that has dependencies on GCC 4.8.5 / 4.9. What is the best way to install the GCC 4.8.5 on the RHEL 8.0 ?
🌐
IT'S FOSS
itsfoss.gitlab.io › post › how-to-install-red-hat-enterprise-linux-8-rhel-8
How To Install Red Hat Enterprise Linux 8 RHEL 8 :: IT'S FOSS
August 16, 2025 - Install RHEL 8 for free Get step-by-step instructions and screenshots to guide you through installing Red Hat Enterprise Linux 8.
🌐
LinuxConfig
linuxconfig.org › home › install gnome on rhel 8 / centos 8
Install GNOME on RHEL 8/CentOS 8: Easy Guide
September 21, 2025 - Learn how to install GNOME on RHEL 8/CentOS 8. Step-by-step guide for GNOME setup & setting default to graphical target.
🌐
Red Hat
developers.redhat.com › blog › 2019 › 03 › 05 › yum-install-gcc-8-clang-6
How to install GCC 8 and Clang/LLVM 6 on Red Hat Enterprise Linux 7 | Red Hat Developer
November 1, 2023 - Optional: Install the Clang static analysis tools scan-build and clang-tidy. Under your normal user ID, run scl enable to add devtoolset-8 and llvm-toolset-6.0 to your path(s). Optional: Permanently enable GCC 8 and Clang 6 by adding scl_source to your .bashrc.
Find elsewhere
🌐
LinuxQuestions.org
linuxquestions.org › questions › linux-newbie-8 › can't-install-g-on-new-red-hat-700670
Can't install g++ on new Red Hat
January 28, 2009 - I've just installed Red Hat Enterprise Linux Desktop (v. 5 for 32-bit x86) on my laptop so I could do some c++ development for a class I'm taking, and
🌐
nixCraft
cyberciti.biz › nixcraft › howto › centos › centos / rhel 7: install gcc (c and c++ compiler) and development tools
CentOS / RHEL 7: Install GCC (C and C++ Compiler) and Development Tools - nixCraft
April 5, 2024 - Explains how to install GNU C, C++ compiler and other development tools on a CentOS and RHEL (Red Hat Enterprise Linux) version 7.x server/workstation.
🌐
LinuxForDevices
linuxfordevices.com › home › tutorials › quick guide: install g++ on red hat linux
Quick Guide: Install g++ on Red Hat Linux - LinuxForDevices
January 24, 2024 - In this tutorial, we'll go through the process of setting up a g++ environment in RedHat Linux for development in C++ applications. Additionally, we'll ...
🌐
Red Hat
access.redhat.com › solutions › 19458
What GCC versions are available in Red Hat Enterprise Linux? - Red Hat Customer Portal
What GCC versions are available in Red Hat Enterprise Linux? What C and C++ compiler comes with RHEL, GCC Toolset, Developer Toolset? Are the GCC Toolset and Developer Toolset available for my RHEL version?
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_enterprise_linux › 8 › html › automatically_installing_rhel › system-requirements-and-supported-architectures_rhel-installer
Chapter 1. System requirements and supported architectures | Automatically installing RHEL | Red Hat Enterprise Linux | 8 | Red Hat Documentation
Installing RHEL with a customized partition layout · Record: The model numbers, sizes, types, and interfaces of the disks attached to the system. For example, Seagate ST3320613AS 320 GB on SATA0, Western Digital WD7500AAKS 750 GB on SATA1.
🌐
IONOS
ionos.com › digital guide › server › configuration › install red hat 8
How to install Red Hat 8 step by step
December 11, 2024 - Start your server and mount the in­stal­la­tion medium in the usual way. Then, follow these in­struc­tions: Reboot your server or device. The boot media will au­to­mat­i­cal­ly display the menu for the RHEL in­stal­la­tion.
🌐
OS Radar
osradar.com › home › linux › how to install gcc & development tools on centos 8 / rhel 8
How to Install GCC & Development Tools on Centos 8 / RHEL 8 - Linux Windows and android Tutorials
October 19, 2019 - In this tutorial you will cover to install GCC & Development tools on Centos / RHEL 8. RHEL 8 is advanced feature Operatig system for development....
🌐
TecMint
tecmint.com › home › open source › how to install gcc and development tools on rhel-based systems
How to Install GCC and Development Tools on RHEL Systems
August 13, 2024 - In this article, we will explain how to install GNU C and C++ compilers and their related development tools in RHEL-based distributions.
🌐
Red Hat
access.redhat.com › discussions › 91e3e8cc-d154-44f4-bbe3-2a971a7177b8
Installing G++4.8.5 or 4.9 on RHEL 8.0
Looks like the latest RHEL 8.0 comes with only GCC 8.2. I have application that has dependencies on GCC 4.8.5 / 4.9. What is the best way to install the GCC 4.8.5 on the RHEL 8.0 ?