How To Install libpfm on Fedora 34

libpfm is Library to encode performance events for use by perf tool Library to encode performance events for use by perf tool

Introduction

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

What is libpfm

libpfm4 is a library to help encode events for use with operating system kernels performance monitoring interfaces. The current version provides support for the perf_events interface available in upstream Linux kernels since v2.6.31. libpfm 4.11.0 4.fc34 x86_64 344 k libpfm-4.11.0-4.fc34.src.rpm fedora Library to encode performance events for use by perf tool http MIT libpfm4 is a library to help encode events for use with operating system kernels performance monitoring interfaces. The current version provides support for the perf_events interface available in upstream Linux kernels since v2.6.31.

We can use yum or dnf to install libpfm on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install libpfm.

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

sudo dnf -y install libpfm

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

sudo yum -y install libpfm

How To Uninstall libpfm on Fedora 34

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

sudo dnf remove libpfm

libpfm Package Contents on Fedora 34

/usr/lib/.build-id
/usr/lib/.build-id/b6
/usr/lib/.build-id/b6/dcd5cc005675ed1757374a1bd1585a457b8bc8
/usr/lib64/libpfm.so.4
/usr/lib64/libpfm.so.4.10.1
/usr/share/doc/libpfm
/usr/share/doc/libpfm/README
/usr/lib/.build-id
/usr/lib/.build-id/d9
/usr/lib/.build-id/d9/4bf209c3ac0966b6c4092d5dc048014579e8d6
/usr/lib/libpfm.so.4
/usr/lib/libpfm.so.4.10.1
/usr/share/doc/libpfm
/usr/share/doc/libpfm/README

References

Summary

In this tutorial we learn how to install libpfm on Fedora 34 using yum and dnf.