How To Install libbpf-devel on Rocky Linux 8

In this tutorial we learn how to install libbpf-devel on Rocky Linux 8. libbpf-devel is Development files for libbpf

Introduction

In this tutorial we learn how to install libbpf-devel on Rocky Linux 8.

What is libbpf-devel

The libbpf-devel package contains libraries header files for developing applications that use libbpf

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

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

sudo dnf -y install libbpf-devel

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

sudo yum -y install libbpf-devel

How To Uninstall libbpf-devel on Rocky Linux 8

To uninstall only the libbpf-devel package we can use the following command:

sudo dnf remove libbpf-devel

libbpf-devel Package Contents on Rocky Linux 8

/usr/include/bpf
/usr/include/bpf/bpf.h
/usr/include/bpf/bpf_core_read.h
/usr/include/bpf/bpf_endian.h
/usr/include/bpf/bpf_helper_defs.h
/usr/include/bpf/bpf_helpers.h
/usr/include/bpf/bpf_tracing.h
/usr/include/bpf/btf.h
/usr/include/bpf/libbpf.h
/usr/include/bpf/libbpf_common.h
/usr/include/bpf/libbpf_util.h
/usr/include/bpf/xsk.h
/usr/lib/libbpf.so
/usr/lib/pkgconfig/libbpf.pc
/usr/include/bpf
/usr/include/bpf/bpf.h
/usr/include/bpf/bpf_core_read.h
/usr/include/bpf/bpf_endian.h
/usr/include/bpf/bpf_helper_defs.h
/usr/include/bpf/bpf_helpers.h
/usr/include/bpf/bpf_tracing.h
/usr/include/bpf/btf.h
/usr/include/bpf/libbpf.h
/usr/include/bpf/libbpf_common.h
/usr/include/bpf/libbpf_util.h
/usr/include/bpf/xsk.h
/usr/lib64/libbpf.so
/usr/lib64/pkgconfig/libbpf.pc

References

Summary

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