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
🌐
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.
🌐
TutorialsPoint
tutorialspoint.com › gnu_debugger › installing_gdb.htm
GDB - Installation
Step 2 − Use the following command to install gdb on linux machine.
🌐
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.
🌐
LinuxQuestions.org
linuxquestions.org › questions › linux-newbie-8 › install-gdb-in-linux-904831
install gdb in Linux
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
🌐
CentOS Repositories
centos.pkgs.org › 7 › centos-sclo-rh-x86_64 › devtoolset-7-gdb-8.0-17.el7.x86_64.rpm.html
devtoolset-7-gdb-8.0-17.el7.x86_64.rpm CentOS 7 Download
GDB, the GNU debugger, allows you to debug programs written in C, C++, Java, and other languages, by executing them in a controlled fashion and printing their data. Install CentOS SCLo RH repository: yum install centos-release-scl-rh · Install devtoolset-7-gdb rpm package: # yum install ...
Find elsewhere
🌐
Linux packages
linux-packages.com › centos-8 › package › gdb-gdbserverx86-64
Complete Guide: Installing gdb-gdbserver.x86_64 on CentOS 8 / RHEL 8 2024
This is a short guide on how to install gdb-gdbserver.x86_64 on CentOS 8 / RHEL 8 $ sudo dnf update Copied $ sudo dnf install gdb-gdbserver.x86_64 Copied
🌐
Installati.one
installati.one › home › centos › 8th › how to install gdb on centos 8
How To Install gdb on CentOS 8 | Installati.one
August 1, 2021 - In this tutorial we learn how to install gdb on CentOS 8 using yum and dnf.
🌐
CSE CGI Server
cgi.cse.unsw.edu.au › ~learn › debugging › modules › gdb_setup
GDB - Basic Setup — Debugging documentation
GDB should be already installed on the CSE systems. If it is not installed on your linux distribution, run the following commands:
🌐
rAthena
rathena.org › support & releases › third party › linux support
How to Install GDB in CentOS? - Linux Support - rAthena
July 25, 2012 - /usr/bin/mysql_config checking for mysql_init in -lmysqlclient... yes checking mysql.h usability... yes checking mysql.h presence... yes checking for mysql.h... yes checking MySQL library (required)... yes (5.0.77) checking for pcre_study in -lpcre... yes checking PCRE library (optional)... yes checking host OS... Linux checking for MinGW...
🌐
Wikitechy
wikitechy.com › tutorial › gdb › how-to-install-gdb
How to install GDB | GDB Tutorial - wikitechy
Use the following command to install gdb on Linux machine. ... Now you can use the following command to find the help information. ... Now you have gdb installed on your system and it is ready to use. ... gdb install windowsinstall gdb macinstall gdb centossolaris 11 install gdbgdb macos catalinagdb downloadgdb windows executablegdb download windowsgdb compilergdb installgdb debuggergdb 7 downloadgdb 7.2 download
🌐
Pkgs.org
pkgs.org › download › gdb
Gdb Download (APK, DEB, EOPKG, IPK, PKG, RPM, TGZ, TXZ, XBPS, XZ, ZST)
Download gdb linux packages for Adélie, AlmaLinux, Alpine, ALT Linux, Amazon Linux, Arch Linux, CentOS, Debian, Fedora, FreeBSD, KaOS, Mageia, NetBSD, OpenMandriva, openSUSE, OpenWrt, PCLinuxOS, Rocky Linux, Slackware, Solus, Ubuntu, Void Linux
🌐
CentOS Repositories
centos.pkgs.org › 7 › centos-sclo-rh-x86_64 › devtoolset-7-gdb-gdbserver-8.0-17.el7.x86_64.rpm.html
devtoolset-7-gdb-gdbserver-8.0-17.el7.x86_64.rpm CentOS 7 Download
GDB, the GNU debugger, allows you ... machine than the one which is running the program being debugged. Install CentOS SCLo RH repository: yum install centos-release-scl-rh ·...