How To Install libcap on Rocky Linux 8

In this tutorial we learn how to install libcap on Rocky Linux 8. libcap is Library for getting and setting POSIX.1e capabilities

Introduction

In this tutorial we learn how to install libcap on Rocky Linux 8.

What is libcap

libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) draft 15 capabilities.

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

Install libcap on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install libcap

Install libcap on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install libcap

How To Uninstall libcap on Rocky Linux 8

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

sudo dnf remove libcap

libcap Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/00
/usr/lib/.build-id/00/73be16edb2f03992267f3bcc49f8e836cd9b8f
/usr/lib/.build-id/1d
/usr/lib/.build-id/1d/d33029567ebdf002c59ae0caa09776eafa3074
/usr/lib/.build-id/6a
/usr/lib/.build-id/6a/c31acedf4006f113dee4fa41390731c999d261
/usr/lib/.build-id/82
/usr/lib/.build-id/82/9d142b0d6203c2a41797a2cdfd3a69dc921e7b
/usr/lib/.build-id/e8
/usr/lib/.build-id/e8/c247091e4142e3163ea903edb9363ff25f6031
/usr/lib/.build-id/fb
/usr/lib/.build-id/fb/847c26007902059dbd60b702b2c4a72e3c27c0
/usr/lib64/libcap.so.2
/usr/lib64/libcap.so.2.26
/usr/lib64/security/pam_cap.so
/usr/sbin/capsh
/usr/sbin/getcap
/usr/sbin/getpcaps
/usr/sbin/setcap
/usr/share/doc/libcap
/usr/share/doc/libcap/capability.notes
/usr/share/licenses/libcap
/usr/share/licenses/libcap/License
/usr/share/man/man1/capsh.1.gz
/usr/share/man/man8/getcap.8.gz
/usr/share/man/man8/getpcaps.8.gz
/usr/share/man/man8/setcap.8.gz
/usr/lib/.build-id
/usr/lib/.build-id/0e
/usr/lib/.build-id/0e/117b611559f47ff519f7872b1baa9ba253e64c
/usr/lib/.build-id/4a
/usr/lib/.build-id/4a/6b0904747f0ff98066d9721166489425d84fc0
/usr/lib/.build-id/5f
/usr/lib/.build-id/5f/f0f2629206fc80a8962e384eda5f83ad80a1f3
/usr/lib/.build-id/e2
/usr/lib/.build-id/e2/a4b46ec394c654cd31ca80183de7a5bc1760b7
/usr/lib/.build-id/ee
/usr/lib/.build-id/ee/e26188e4dec54174f68cdb3eebc4178cc9fffd
/usr/lib/.build-id/f7
/usr/lib/.build-id/f7/a5ce47d3ac7176f951dd971eb8677fb906ff3c
/usr/lib/libcap.so.2
/usr/lib/libcap.so.2.26
/usr/lib/security/pam_cap.so
/usr/sbin/capsh
/usr/sbin/getcap
/usr/sbin/getpcaps
/usr/sbin/setcap
/usr/share/doc/libcap
/usr/share/doc/libcap/capability.notes
/usr/share/licenses/libcap
/usr/share/licenses/libcap/License
/usr/share/man/man1/capsh.1.gz
/usr/share/man/man8/getcap.8.gz
/usr/share/man/man8/getpcaps.8.gz
/usr/share/man/man8/setcap.8.gz

References

Summary

In this tutorial we learn how to install libcap on Rocky Linux 8 using yum and dnf.