I would suggest you to follow below mentioned steps, which have been referred from here.

Step 1. Install a package with repository for your system:

On CentOS, install package centos-release-scl available in CentOS repository:

sudo yum -y install centos-release-scl

On RHEL, enable RHSCL repository for you system:

sudo yum-config-manager --enable rhel-server-rhscl-7-rpms

Step 2. Install the collection:

sudo yum -y install devtoolset-7

Step 3. Start using software collections:

scl enable devtoolset-7 bash
Answer from Srijan Chaudhary on Stack Exchange
🌐
LinuxConfig
linuxconfig.org › home › how to install gdb in rhel 8
Install gdb on RHEL 8: Step-by-Step Guide
September 22, 2025 - Learn to install gdb on RHEL 8 and debug C programs using breakpoints. Get step-by-step guidance on using gdb effectively.
Discussions

Not able to install GDB on Fedora - Stack Overflow
You may need to install some ... to build gdb. The exact package list depends on error messages from ./configure and make. Here is installed package list on my system: # rpm -qa "*devel" kernel-devel-2.6.23.1-42.fc8 ncurses-devel-5.6-12.20070812.fc8 python-devel-2.5.1-15.fc8 expat-devel-2.0.1-2 libtirpc-devel-0.1.7-12.fc8 glibc-devel-2.7-2 libstdc++-devel-4.1.2-33 · Try to install all of them with yum... More on stackoverflow.com
🌐 stackoverflow.com
linux - How to install gdb with no package manager? - Unix & Linux Stack Exchange
I'm trying to reverse engineer some software on a system that runs embedded Linux. I've ssh-ed into it, and right now I'm trying to attach gdb to one of the processes so I can get some information ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
June 30, 2022
use gdb on a core file
I don’t have experience using debuginfo-install, but I think you can just enable the debuginfo repo? /etc/yum.repos.d/CentOS-Debuginfo.repo enabled=0 -> 1 Then just install normally: sudo yum install glibc-debuginfo (Sorry for formatting & maybe typos - on mobile) More on reddit.com
🌐 r/CentOS
3
5
April 5, 2021
Debugging C++ in devcontainer
That should work fine. Post your launch.json. Btw: on centos7 you’ll probably want to use a more up-to-date devtoolset and its associated gdb, rather than the default one which is ancient. More on reddit.com
🌐 r/docker
3
2
December 16, 2024
🌐
Red Hat
docs.redhat.com › en › documentation › red_hat_developer_toolset › 9 › html › user_guide › chap-gdb
Chapter 8. GNU Debugger (GDB) | User Guide | Red Hat Developer Toolset | 9 | Red Hat Documentation
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.
🌐
iO Flood
ioflood.com › blog › install-gdb-command-linux
Linux GDB Command Installation: A Step-by-Step Guide
January 2, 2024 - However, if it’s not, you can install it in Debian based distributions like Ubuntu, by running the command sudo apt-get install gdb. For distributions like CentOS that use the RPM package manager, you would run the command sudo yum install gdb.
🌐
Stack Overflow
stackoverflow.com › questions › 2792912 › not-able-to-install-gdb-on-fedora
Not able to install GDB on Fedora - Stack Overflow
You may need to install some development packages with header files needed to build gdb. The exact package list depends on error messages from ./configure and make. Here is installed package list on my system: # rpm -qa "*devel" kernel-devel-2.6.23.1-42.fc8 ncurses-devel-5.6-12.20070812.fc8 python-devel-2.5.1-15.fc8 expat-devel-2.0.1-2 libtirpc-devel-0.1.7-12.fc8 glibc-devel-2.7-2 libstdc++-devel-4.1.2-33 · Try to install all of them with yum.
🌐
Interrupt
interrupt.memfault.com › blog › installing-gdb
Tools we use: installing GDB for ARM | Interrupt
August 3, 2022 - Windows users may use something like chocolately or the recent winget tool. It’s certainly convenient to be able to do something as simple as this to acquire a version of gdb compatible with arm targets: ❯ sudo apt install gdb-multiarch ·
🌐
Gdbtutorial
gdbtutorial.com › tutorial › how-install-gdb
How to Install GDB? | GDB Tutorial
Ubuntu, Mint, etc) by following command.$ sudo apt-get update $ sudo apt-get install gdb
🌐
Daniel Nashed's Blog
blog.nashcom.de › nashcomblog.nsf › dx › replacing-gnu-debugger-with-gdb-minimal-package-for-domino.htm
Replacing GNU Debugger with gdb-minimal ... - Daniel Nashed
When you build the container image on a platform that does not have python installed, it will not be installed when building the container image. For example UBI minimal does not include it by default. Example: yum install -y gdb-minimal ln -s /usr/bin/gdb.minimal /usr/bin/gdb
Find elsewhere
🌐
Nitcbase
nitcbase.github.io › docs › Misc › GDB
GNU Debugger(GDB) | NITCbase
sudo apt update sudo apt-get install -y gdb · sudo yum install gdb · sudo pacman -Sy gdb · Now you can confirm the installation of GDB by executing the command gdb -help again. You have to tell your compiler to compile your code with symbolic debugging information included.
🌐
rAthena
rathena.org › support & releases › third party › linux support
How to Install GDB in CentOS? - Linux Support - rAthena
July 25, 2012 - gdb map-server_sql map-server_sql.core · still doesnt save · it says · Reading symbols from /eathena/map-server_sql...done. /eathena/map-server_sql.core: No such file or directory. Please Help, SlashGeeGee Edited May 16, 2012 by SlashGeeGee · Quote · Sort by votes · Sort by date · You can post now and register later. If you have an account, sign in now to post with your account. Share · https://rathena.org/board/topic/63493-how-to-install-gdb-in-centos/ More sharing options...
🌐
Contradodigital
yum-info.contradodigital.com › view-package › base › gdb
About gdb for Yum on Linux
Control the gdb package with the following handy commands outlined below. ... This command will install gdb on the server.
🌐
LinuxQuestions.org
linuxquestions.org › questions › linux-newbie-8 › install-gdb-in-linux-904831
install gdb in Linux
September 24, 2011 - Hi, I need gdb but when I run gdb command I get the following error: bash: gdb: command not found Could you please tell me what should I do to fix
🌐
TutorialsPoint
tutorialspoint.com › gnu_debugger › installing_gdb.htm
GDB - Installation
Step 2 − Use the following command to install gdb on linux machine.
🌐
Ladydebug
ladydebug.com › blog › 2020 › 02 › 18 › fixing-dbg-installation-problem
Fixing dbg installation problem – Debugging Everything
February 18, 2020 - I opened /etc/yum.repos.d/CentOS-Base.repo in text and changed all “enabled=0” to “enabled=1”. And what I got after these changes: gdb was installed successfully.
🌐
GNU Project
sourceware.org › gdb
GDB: The GNU Project Debugger
GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it executes -- or what another program was doing at the moment it crashed.
🌐
Herc
docs.herc.ws › contributing › gdb
Gdb - Hercules Docs
If you have access to gdm and the synaptic package manager, you can simply search for 'gdb' and mark for complete installation. On YUM based systems, you can simply issue the following to install gdb via RPM packages:
🌐
Red Hat
bugzilla.redhat.com › show_bug.cgi
243090 – yum installs 32 and 64 bit packages, but only one of the versions become active, because they replace each other
Red Hat Bugzilla – Bug 243090 · This site requires JavaScript to be enabled to function correctly, please enable it · Privacy Contact FAQ Legal
🌐
Linux From Scratch
linuxfromscratch.org › blfs › view › svn › general › gdb.html
GDB-16.3
If you have built the API documentation, it is now in gdb/doc/doxy. You can install it (as the root user):