How To Install libpfm.x86_64 on Amazon Linux 2

In this tutorial we learn how to install libpfm.x86_64 in Amazon Linux 2. libpfm.x86_64 is Library to encode performance events for use by perf tool

Introduction

In this tutorial we learn how to install libpfm.x86_64 on Amazon Linux 2.

What is libpfm.x86_64

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 to install libpfm.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install libpfm.x86_64.

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

sudo yum -y install libpfm.x86_64

How To Uninstall libpfm.x86_64 on Amazon Linux 2

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

sudo yum remove libpfm.x86_64

libpfm.x86_64 Package Contents on Amazon Linux 2

/usr/lib64/libpfm.so.4
/usr/lib64/libpfm.so.4.7.0
/usr/share/doc/libpfm-4.7.0
/usr/share/doc/libpfm-4.7.0/README

References

Summary

In this tutorial we learn how to install libpfm.x86_64 on Amazon Linux 2 using yum.