How To Install elfutils on CentOS 8

elfutils is A collection of utilities and DSOs to handle ELF files and DWARF data

Introduction

In this tutorial we learn how to install elfutils on CentOS 8.

What is elfutils

Elfutils is a collection of utilities, including stack (to show backtraces), nm (for listing symbols from object files), size (for listing the section sizes of an object or archive file), strip (for discarding symbols), readelf (to see the raw ELF file structures), elflint (to check for well-formed ELF files) and elfcompress (to compress or decompress ELF sections).

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

Install elfutils on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo dnf -y install elfutils

Install elfutils on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo yum -y install elfutils

How To Uninstall elfutils on CentOS 8

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

sudo dnf remove elfutils

elfutils Package Contents on CentOS 8

/usr/bin/eu-addr2line
/usr/bin/eu-ar
/usr/bin/eu-elfclassify
/usr/bin/eu-elfcmp
/usr/bin/eu-elfcompress
/usr/bin/eu-elflint
/usr/bin/eu-findtextrel
/usr/bin/eu-make-debug-archive
/usr/bin/eu-nm
/usr/bin/eu-objdump
/usr/bin/eu-ranlib
/usr/bin/eu-readelf
/usr/bin/eu-size
/usr/bin/eu-stack
/usr/bin/eu-strings
/usr/bin/eu-strip
/usr/bin/eu-unstrip
/usr/lib/.build-id
/usr/lib/.build-id/03
/usr/lib/.build-id/03/cceeb01b802ea833131b07561115934793119d
/usr/lib/.build-id/10
/usr/lib/.build-id/10/84f34069e3e6c539e7c957ee9a694c752273ce
/usr/lib/.build-id/2a
/usr/lib/.build-id/2a/680192af392e2de50500194bbead4420258b0f
/usr/lib/.build-id/54
/usr/lib/.build-id/54/1216ea75f3442aa933a266a6467090389525d9
/usr/lib/.build-id/5b
/usr/lib/.build-id/5b/9238a771340dc007edb84ce66e727cbef1a026
/usr/lib/.build-id/62
/usr/lib/.build-id/62/9704299f9c85bd0833a980e9d88204c55e883b
/usr/lib/.build-id/68
/usr/lib/.build-id/68/fb4518c972ab92c63564bfe49b788d6b17d820
/usr/lib/.build-id/75
/usr/lib/.build-id/75/cc787545d855de1bea9783c733670e1d3a5ef1
/usr/lib/.build-id/75/eaaa923092695ac9ebc7f77dcfcdcbd1ed5064
/usr/lib/.build-id/97
/usr/lib/.build-id/97/34fd89c2e964a4e1256340ad6a9ee64ddd25fa
/usr/lib/.build-id/a6
/usr/lib/.build-id/a6/379e23f9fccfd8fed3f55900c113e701fd5882
/usr/lib/.build-id/cd
/usr/lib/.build-id/cd/34ff17862ed974139386b86c1a6f645858b4d3
/usr/lib/.build-id/d9
/usr/lib/.build-id/d9/13cfd6ca767004c67591234d97f11bfe830649
/usr/lib/.build-id/e3
/usr/lib/.build-id/e3/5131ec748f9a6b532dbcf2a1b128f5a657d0d4
/usr/lib/.build-id/e8
/usr/lib/.build-id/e8/5a107a89289c123812f45af07ed811af16d073
/usr/lib/.build-id/fd
/usr/lib/.build-id/fd/29c3648a0f0dc7d1a36f3d0b1997af4fb83470
/usr/share/doc/elfutils
/usr/share/doc/elfutils/CONTRIBUTING
/usr/share/doc/elfutils/README
/usr/share/doc/elfutils/TODO
/usr/share/licenses/elfutils
/usr/share/licenses/elfutils/COPYING
/usr/share/licenses/elfutils/COPYING-GFDL
/usr/share/licenses/elfutils/COPYING-GPLV2
/usr/share/licenses/elfutils/COPYING-LGPLV3
/usr/share/man/man1/eu-elfclassify.1.gz
/usr/share/man/man1/eu-readelf.1.gz

References

Summary

In this tutorial we learn how to install elfutils on CentOS 8 using yum and dnf.