How To Install bcc on Fedora 34

bcc is BPF Compiler Collection (BCC)

Introduction

In this tutorial we learn how to install bcc on Fedora 34.

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 Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install bcc.

Install bcc on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo dnf -y install bcc

Install bcc on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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 Fedora 34

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

sudo dnf remove bcc

bcc Package Contents on Fedora 34

/usr/lib/.build-id
/usr/lib/.build-id/11
/usr/lib/.build-id/11/b59b71177e8da2f14613d68b013aaaa23a84be
/usr/lib/.build-id/de
/usr/lib/.build-id/de/ac493086f79bc247e815be11cea5772d6c2933
/usr/lib64/libbcc.so.0
/usr/lib64/libbcc.so.0.20.0
/usr/lib64/libbcc_bpf.so.0
/usr/lib64/libbcc_bpf.so.0.20.0
/usr/share/doc/bcc
/usr/share/doc/bcc/README.md
/usr/share/licenses/bcc
/usr/share/licenses/bcc/LICENSE.txt
/usr/lib/.build-id
/usr/lib/.build-id/72
/usr/lib/.build-id/72/e522d701f3601e6617b59199fe987cb21ede5a
/usr/lib/.build-id/8b
/usr/lib/.build-id/8b/1493a1f987eadd742c39d8bc6d8a381863779e
/usr/lib/.build-id/c5
/usr/lib/.build-id/c5/e4f4fb2825d4adfaa7bc3f3edda959082ed6d0
/usr/lib64/libbcc-no-libbpf.so.0
/usr/lib64/libbcc-no-libbpf.so.0.18.0
/usr/lib64/libbcc.so.0
/usr/lib64/libbcc.so.0.18.0
/usr/lib64/libbcc_bpf.so.0
/usr/lib64/libbcc_bpf.so.0.18.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 Fedora 34 using yum and dnf.