Fixing dbg installation problem

By | February 18, 2020

I needed to install gdb quickly on my CentOS 7 VM box, but it failed. yum command could not find appropriate repository for download and installation. The same I had before with different application.
Of course it was possible to perform all installation steps manually: find location of appropriate rpm or source files and rebuild, however I was lazy to do it. What I had before:


# yum install gdb
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: mirror.oss.ou.edu
* epel-debuginfo: mirror.oss.ou.edu
* epel-source: mirror.oss.ou.edu
* epel-testing-debuginfo: mirror.oss.ou.edu
No package gdb available.
Error: Nothing to do

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:


# yum install gdb
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.dal10.us.leaseweb.net
* centosplus: mirror.dal10.us.leaseweb.net
* epel: fedora-epel.mirror.lstn.net
* epel-debuginfo: fedora-epel.mirror.lstn.net
* epel-source: fedora-epel.mirror.lstn.net
* epel-testing-debuginfo: fedora-epel.mirror.lstn.net
* extras: mirror.dal10.us.leaseweb.net
* updates: mirror.dal10.us.leaseweb.net
base/7/x86_64/signature | 811 B 00:00
base/7/x86_64/signature | 3.6 kB 00:00 !!!
centosplus/7/x86_64/signature | 811 B 00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid : “CentOS-7 Key (CentOS 7 Official Signing Key)
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-7.1908.0.el7.centos.x86_64 (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]: y
centosplus/7/x86_64/signature | 2.9 kB 00:01 !!!
extras/7/x86_64/signature | 811 B 00:00
extras/7/x86_64/signature | 2.9 kB 00:00 !!!
updates/7/x86_64/signature | 811 B 00:00
updates/7/x86_64/signature | 2.9 kB 00:00 !!!
(1/5): extras/7/x86_64/primary_db | 159 kB 00:00
(2/5): base/7/x86_64/group_gz | 165 kB 00:00
(3/5): base/7/x86_64/primary_db | 6.0 MB 00:00
(4/5): updates/7/x86_64/primary_db | 6.7 MB 00:00
(5/5): centosplus/7/x86_64/primary_db | 2.7 MB 00:01
Resolving Dependencies
–> Running transaction check
—> Package gdb.x86_64 0:7.6.1-115.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
gdb x86_64 7.6.1-115.el7 base 2.4 M

Transaction Summary
================================================================================
Install 1 Package

Total download size: 2.4 M
Installed size: 7.0 M
Is this ok [y/d/N]: y
Downloading packages:
gdb-7.6.1-115.el7.x86_64.rpm | 2.4 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : gdb-7.6.1-115.el7.x86_64 1/1
Verifying : gdb-7.6.1-115.el7.x86_64 1/1

Installed:
gdb.x86_64 0:7.6.1-115.el7

Complete!



gdb was installed successfully. And pay attention that list of repositories used by yum was changed.

Leave a Reply

Your email address will not be published. Required fields are marked *