How To Install gdb on AlmaLinux 8

In this tutorial we learn how to install gdb in AlmaLinux 8. gdb is A stub package for GNU source-level debugger

Introduction

In this tutorial we learn how to install gdb on AlmaLinux 8.

What is gdb

‘gdb’ package is only a stub to install gcc-gdb-plugin for ‘compile’ commands. See package ‘gdb-headless’.

We can use yum or dnf to install gdb on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install gdb.

Install gdb on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install gdb using dnf by running the following command:

sudo dnf -y install gdb

Install gdb on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install gdb using yum by running the following command:

sudo yum -y install gdb

How To Uninstall gdb on AlmaLinux 8

To uninstall only the gdb package we can use the following command:

sudo dnf remove gdb

References

Summary

In this tutorial we learn how to install gdb on AlmaLinux 8 using yum and dnf.