How To Install rpm-build on CentOS 8

rpm-build is Scripts and executable programs used to build packages

Introduction

In this tutorial we learn how to install rpm-build on CentOS 8.

What is rpm-build

The rpm-build package contains the scripts and executable programs that are used to build packages using the RPM Package Manager.

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

Install rpm-build 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 rpm-build using dnf by running the following command:

sudo dnf -y install rpm-build

Install rpm-build 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 rpm-build using yum by running the following command:

sudo yum -y install rpm-build

How To Uninstall rpm-build on CentOS 8

To uninstall only the rpm-build package we can use the following command:

sudo dnf remove rpm-build

rpm-build Package Contents on CentOS 8

/usr/bin/gendiff
/usr/bin/rpmbuild
/usr/bin/rpmspec
/usr/lib/.build-id
/usr/lib/.build-id/14
/usr/lib/.build-id/14/6d72e59de7d447aab78be399e719e4ff5c23a7
/usr/lib/.build-id/45/928ac80ba3d804fb5af00c6dc072056a685d5f
/usr/lib/.build-id/a1
/usr/lib/.build-id/a1/09476b4036d73e9ce3c07c7831b0b684686052
/usr/lib/.build-id/bf
/usr/lib/.build-id/bf/2ee29b48c3879fd677ad3983b8342cf7147c32
/usr/lib/.build-id/d6
/usr/lib/.build-id/d6/cc4c79d72b3e1c5840324a80abcc4e8f726f9d
/usr/lib/.build-id/f6
/usr/lib/.build-id/f6/a6e9b3bc32f0d5adadf411b0dd53a578fa1d5d
/usr/lib/rpm/brp-compress
/usr/lib/rpm/brp-java-gcjcompile
/usr/lib/rpm/brp-python-bytecompile
/usr/lib/rpm/brp-python-hardlink
/usr/lib/rpm/brp-strip
/usr/lib/rpm/brp-strip-comment-note
/usr/lib/rpm/brp-strip-shared
/usr/lib/rpm/brp-strip-static-archive
/usr/lib/rpm/check-buildroot
/usr/lib/rpm/check-files
/usr/lib/rpm/check-prereqs
/usr/lib/rpm/check-rpaths
/usr/lib/rpm/check-rpaths-worker
/usr/lib/rpm/config.guess
/usr/lib/rpm/config.sub
/usr/lib/rpm/debugedit
/usr/lib/rpm/debuginfo.prov
/usr/lib/rpm/desktop-file.prov
/usr/lib/rpm/elfdeps
/usr/lib/rpm/fileattrs/debuginfo.attr
/usr/lib/rpm/fileattrs/desktop.attr
/usr/lib/rpm/fileattrs/elf.attr
/usr/lib/rpm/fileattrs/font.attr
/usr/lib/rpm/fileattrs/libtool.attr
/usr/lib/rpm/fileattrs/metainfo.attr
/usr/lib/rpm/fileattrs/mono.attr
/usr/lib/rpm/fileattrs/ocaml.attr
/usr/lib/rpm/fileattrs/pkgconfig.attr
/usr/lib/rpm/fileattrs/script.attr
/usr/lib/rpm/find-debuginfo.sh
/usr/lib/rpm/find-lang.sh
/usr/lib/rpm/find-provides
/usr/lib/rpm/find-requires
/usr/lib/rpm/fontconfig.prov
/usr/lib/rpm/libtooldeps.sh
/usr/lib/rpm/macros.perl
/usr/lib/rpm/macros.php
/usr/lib/rpm/macros.python
/usr/lib/rpm/metainfo.prov
/usr/lib/rpm/mkinstalldirs
/usr/lib/rpm/mono-find-provides
/usr/lib/rpm/mono-find-requires
/usr/lib/rpm/ocaml-find-provides.sh
/usr/lib/rpm/ocaml-find-requires.sh
/usr/lib/rpm/pkgconfigdeps.sh
/usr/lib/rpm/rpmdeps
/usr/lib/rpm/script.req
/usr/lib/rpm/sepdebugcrcfix
/usr/share/man/man1/gendiff.1.gz
/usr/share/man/man8/rpmbuild.8.gz
/usr/share/man/man8/rpmdeps.8.gz
/usr/share/man/man8/rpmspec.8.gz
/usr/bin/gendiff
/usr/bin/rpmbuild
/usr/bin/rpmspec
/usr/lib/.build-id
/usr/lib/.build-id/2b
/usr/lib/.build-id/2b/ed88d7e6706f403a0b93111855ad4d14b42955
/usr/lib/.build-id/39
/usr/lib/.build-id/39/96b9ce7fc25d6048fe1576bfa46683fcb34a1c
/usr/lib/.build-id/49
/usr/lib/.build-id/49/fedece7ad9da53173e7aaf583ce3d2a67234ae
/usr/lib/.build-id/4f
/usr/lib/.build-id/4f/79176ea1e393f22a191bb4deb9766b0fedd7df
/usr/lib/.build-id/ae
/usr/lib/.build-id/ae/4fe4c8d1dbc37629ba2009fe906a8d3d57650a
/usr/lib/.build-id/c6
/usr/lib/.build-id/c6/0e5a1d876da1b6d54c2db4fef9a85d363a90b8
/usr/lib/rpm/brp-compress
/usr/lib/rpm/brp-java-gcjcompile
/usr/lib/rpm/brp-python-bytecompile
/usr/lib/rpm/brp-python-hardlink
/usr/lib/rpm/brp-strip
/usr/lib/rpm/brp-strip-comment-note
/usr/lib/rpm/brp-strip-shared
/usr/lib/rpm/brp-strip-static-archive
/usr/lib/rpm/check-buildroot
/usr/lib/rpm/check-files
/usr/lib/rpm/check-prereqs
/usr/lib/rpm/check-rpaths
/usr/lib/rpm/check-rpaths-worker
/usr/lib/rpm/config.guess
/usr/lib/rpm/config.sub
/usr/lib/rpm/debugedit
/usr/lib/rpm/debuginfo.prov
/usr/lib/rpm/desktop-file.prov
/usr/lib/rpm/elfdeps
/usr/lib/rpm/fileattrs/debuginfo.attr
/usr/lib/rpm/fileattrs/desktop.attr
/usr/lib/rpm/fileattrs/elf.attr
/usr/lib/rpm/fileattrs/font.attr
/usr/lib/rpm/fileattrs/libtool.attr
/usr/lib/rpm/fileattrs/metainfo.attr
/usr/lib/rpm/fileattrs/mono.attr
/usr/lib/rpm/fileattrs/ocaml.attr
/usr/lib/rpm/fileattrs/pkgconfig.attr
/usr/lib/rpm/fileattrs/script.attr
/usr/lib/rpm/find-debuginfo.sh
/usr/lib/rpm/find-lang.sh
/usr/lib/rpm/find-provides
/usr/lib/rpm/find-requires
/usr/lib/rpm/fontconfig.prov
/usr/lib/rpm/libtooldeps.sh
/usr/lib/rpm/macros.perl
/usr/lib/rpm/macros.php
/usr/lib/rpm/macros.python
/usr/lib/rpm/metainfo.prov
/usr/lib/rpm/mkinstalldirs
/usr/lib/rpm/mono-find-provides
/usr/lib/rpm/mono-find-requires
/usr/lib/rpm/ocaml-find-provides.sh
/usr/lib/rpm/ocaml-find-requires.sh
/usr/lib/rpm/pkgconfigdeps.sh
/usr/lib/rpm/rpmdeps
/usr/lib/rpm/script.req
/usr/lib/rpm/sepdebugcrcfix
/usr/share/man/man1/gendiff.1.gz
/usr/share/man/man8/rpmbuild.8.gz
/usr/share/man/man8/rpmdeps.8.gz
/usr/share/man/man8/rpmspec.8.gz

References

Summary

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