I feel foolish because I figured it out right after posting, but I figured I'd share because it isn't intuitive and hopefully this will save someone some time.

The package you want to install is not gcc. You want to install gcc-toolset-9. You will notice after installation that you will still get 8.x if you do a gcc --version. gcc-toolset-9 installs to /opt. The idea is to give you a separate development environment. See this documentation. After installation you can run the updated gcc with /opt/rh/gcc-toolset-9/<username>/bin/gcc.

As @Stephen Kitt pointed out, you can actually get a shell with the updated toolset by running scl enable gcc-toolset-9 bash. Running this command will open a new bash session with the environment variables appropriately updated.

You can also run gcc v.9 directly with scl enable gcc-toolset-9 gcc <your_gcc_args>. See this documentation for details.

Answer from Grant Curell on Stack Exchange
🌐
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.
Discussions

Installing GCC5.2.0 in RHEL 8.8
One possible solution is to install these dependencies manually, using the source code from the GCC infrastructure.. You can follow the instructions in this Stack Overflow answer to configure and build each dependency with static libraries, and then use them to compile GCC 5.2.0. https://stackoverflow.com/questions/9450394/how-to-install-gcc-piece-by-piece-with-gmp-mpfr-mpc-elf-without-shared-libra Kerem Çeliker More on reddit.com
🌐 r/redhat
7
2
December 21, 2023
About libstdc++.so.5
Hello everyone, I’m using Rocky Linux 8.10, and my EDA tools require libstdc++.so.5. I’ve searched for it for a long time but still can’t find it. How can I resolve this issue? Thank. More on forums.rockylinux.org
🌐 forums.rockylinux.org
9
0
November 18, 2025
How do I install gcc from source on RHEL 7 (WITHOUT A SUBSCRIPTION!)?
I'm not knowledgeable in servers or this type of situation but it sounds to me that migration to another distro would be a good idea. If RHEL wants you to pay subscription to compile GCC then that's lame. Open source platforms should be restriction free and commercial support is what you should be paying for. For servers I hear that Centos, Opensuse, and Ubuntu are great, but like I said I'm not too knowledgeable in this area. I'm a Linux desktop user. That's my 2 cents anyway. More on reddit.com
🌐 r/linuxquestions
8
1
September 5, 2018
When will Gcc 14 be available via gcc-toolset?
gcc-toolset 13 is currently in RHEL9.4, I wouldn't expect 14 to be in 8.10, and as a result, likely not going to land in RHEL8 now that it's transitioning to Maintenance Phase. It could land in RHEL9 later as part of an application stream. More on reddit.com
🌐 r/redhat
8
4
May 16, 2024
🌐
ComputingForGeeks
computingforgeeks.com › home › install gcc and development tools on rhel 8 / centos 8
Install GCC and Development Tools on RHEL 8 / CentOS 8 [Guide]
August 17, 2023 - Step-by-step guide to gCC and Development Tools on RHEL 8 / CentOS 8. Includes commands, verification, and troubleshooting.
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_enterprise_linux › 8 › html › developing_c_and_cpp_applications_in_rhel_8 › additional-toolsets-for-development_developing-applications
Chapter 4. Additional toolsets for development | Developing C and C++ applications in RHEL 8 | Red Hat Enterprise Linux | 8 | Red Hat Documentation
... To access and run the GCC Toolset container image, use a standard container engine like Podman. Authenticate with the registry, pull the image, and launch a container to access an isolated, pre-configured toolchain for development. ... Podman is installed.
🌐
Reddit
reddit.com › r/redhat › installing gcc5.2.0 in rhel 8.8
r/redhat on Reddit: Installing GCC5.2.0 in RHEL 8.8
December 21, 2023 -

Hi All,

I'm trying to install the GCC5.2.0 in RHEL 8.8 as it requires by the tool that I'm using. I'm installing it manually using its source code that I got from here:
Index of /gnu/gcc/gcc-5.2.0

These are the commands I'm using:

tar -xvf gcc-5.2.0.tar.gz
cd gcc-5.2.0
./contrib/download_prerequisites
./configure --enable-checking=release --enable-packages=c,c++ --disable-multilib
make -j 4

However, I'm getting an error under make -j 4:

I've already installed "Developer Tools" and "gcc-c++" which suggested online but i'm still getting the error.

Any idea how to fix this?

Regards,

🌐
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.
Find elsewhere
🌐
Snapcraft
snapcraft.io › install › gcc-13 › rhel
Install gcc-13 on Red Hat Enterprise Linux using the Snap Store | Snapcraft
May 26, 2025 - Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions. Snap is available for Red Hat Enterprise Linux (RHEL) 8 and RHEL 7, from the 7.6 release onward.
🌐
nixCraft
cyberciti.biz › nixcraft › howto › centos › download and install c, c++ compiler on red hat enterprise linux 5 (rhel)
Download and Install C, C++ Compiler on Red Hat Enterprise Linux 5 (RHEL) - nixCraft
April 5, 2024 - You can use a GUI tool called system-config-packages to install gcc. Just type the following command and select gcc and above packages: $ system-config-packages & Mount your RHEL/CentOS Linux CD/DVD and install the following packages using rpm ...
🌐
Rocky Linux Forum
forums.rockylinux.org › rocky linux help & support
About libstdc++.so.5 - Rocky Linux Help & Support - Rocky Linux Forum
November 18, 2025 - Hello everyone, I’m using Rocky Linux 8.10, and my EDA tools require libstdc++.so.5. I’ve searched for it for a long time but still can’t find it. How can I resolve this issue? Thank.
🌐
Hyprland Wiki
wiki.hypr.land › Getting-Started › Installation
Installation – Hyprland Wiki
2 days ago - (this should also work on RHEL/Fedora if you remove Mesa-libGLESv3-devel and pkgconfig(xcb-errors)) ... pkg install git pkgconf gmake gcc evdev-proto cmake wayland-protocols wayland libglvnd libxkbcommon libinput cairo pango pixman libxcb pkg install meson jq hwdata libdisplay-info libliftoff export CC=gcc CXX=g++ LDFLAGS="-static-libstdc++ -static-libgcc"
🌐
Arm Developer
developer.arm.com › downloads › - › arm-gnu-toolchain-downloads
Arm GNU Toolchain Downloads – Arm Developer
Arm recommends restricting write access, to any custom installation location, to only the users who are allowed to run the installer. aarch64_be-none-linux-gnu-gdb and aarch64_be-none-linux-gnu-gdb-py on Linux hosts requires liblzma.so.5. Toolchains dedicated for Windows host require mingw-w64 library, a complete runtime environment for GCC.
🌐
LPAR2RRD
lpar2rrd.com › rhel8-install.php
Server Monitoring : RHV 8 Installation
You have to download and install them manually via bellow packages, when it does not work use cpan method bellow. Download Site: www.city-fan.org/ftp/contrib/yum-repo/rhel8/x86_64/ www.city-fan.org/ftp/contrib/yum-repo/rhel8/x86_64/perl-Gra...
🌐
Unraveldata
unravel-docs.unraveldata.com › unravel-v4823 › en › install-gcc-compiler.html
Installing GNU Compiler Collection (GCC)
[unravel@host ~]$ echo 'source /opt/rh/devtoolset-8/enable' >> ~/.bashrc · Verify the GCC version after adding in bash_profile or bashrc:
🌐
Rust Programming Language
rust-lang.org › tools › install
Install Rust - Rust Programming Language
It looks like you’re running macOS, Linux, or another Unix-like OS. To download Rustup and install Rust, run the following in your terminal, then follow the on-screen instructions.
🌐
GitHub
github.com › tmux › tmux › wiki › Installing
Installing
For example to set up a repository and install on RHEL8: sudo yum install http://galaxy4.net/repo/galaxy4-release-8-current.noarch.rpm sudo yum install tmux
Author   tmux
🌐
CMake
cmake.org › download
Download CMake
The release was packaged with CPack which is included as part of the release. The .sh files are self extracting gziped tar files. To install a .sh file, run it with /bin/sh and follow the directions. The OS-machine.tar.gz files are gziped tar files of the install tree.