How To Install bcc on Rocky Linux 8

In this tutorial we learn how to install bcc on Rocky Linux 8. bcc is BPF Compiler Collection (BCC)

Introduction

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

What is bcc

BCC is a toolkit for creating efficient kernel tracing and manipulation programs, and includes several useful tools and examples. It makes use of extended BPF (Berkeley Packet Filters), formally known as eBPF, a new feature that was first added to Linux 3.15. BCC makes BPF programs easier to write, with kernel instrumentation in C (and includes a C wrapper around LLVM), and front-ends in Python and lua. It is suited for many tasks, including performance analysis and network traffic control.

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

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

sudo dnf -y install bcc

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

sudo yum -y install bcc

How To Uninstall bcc on Rocky Linux 8

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

sudo dnf remove bcc

bcc Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/42
/usr/lib/.build-id/42/3efede0a991684a74c5fb21689a75673c5a2ea
/usr/lib/.build-id/54
/usr/lib/.build-id/54/1c4fc7c42ffce4e9f9ae9c27ab66db5f7e9ba4
/usr/lib/.build-id/be
/usr/lib/.build-id/be/d3b16ccb383fda7ae1495914792c1a6df6839d
/usr/lib64/libbcc-no-libbpf.so.0
/usr/lib64/libbcc-no-libbpf.so.0.16.0
/usr/lib64/libbcc.so.0
/usr/lib64/libbcc.so.0.16.0
/usr/lib64/libbcc_bpf.so.0
/usr/lib64/libbcc_bpf.so.0.16.0
/usr/share/doc/bcc
/usr/share/doc/bcc/README.md
/usr/share/licenses/bcc
/usr/share/licenses/bcc/LICENSE.txt

References

Summary

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