How To Install libbpf-devel.x86_64 on Amazon Linux 2

In this tutorial we learn how to install libbpf-devel.x86_64 in Amazon Linux 2. libbpf-devel.x86_64 is Development files for libbpf

Introduction

In this tutorial we learn how to install libbpf-devel.x86_64 on Amazon Linux 2.

What is libbpf-devel.x86_64

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

We can use yum to install libbpf-devel.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install libbpf-devel.x86_64.

Install libbpf-devel.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install libbpf-devel.x86_64 using yum by running the following command:

sudo yum -y install libbpf-devel.x86_64

How To Uninstall libbpf-devel.x86_64 on Amazon Linux 2

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

sudo yum remove libbpf-devel.x86_64

libbpf-devel.x86_64 Package Contents on Amazon Linux 2

/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.x86_64 on Amazon Linux 2 using yum.