How To Install librdkafka on Rocky Linux 8

In this tutorial we learn how to install librdkafka on Rocky Linux 8. librdkafka is The Apache Kafka C library

Introduction

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

What is librdkafka

Librdkafka is a C/C++ library implementation of the Apache Kafka protocol, containing both Producer and Consumer support. It was designed with message delivery reliability and high performance in mind, current figures exceed 800000 messages/second for the producer and 3 million messages/second for the consumer.

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

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

sudo dnf -y install librdkafka

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

sudo yum -y install librdkafka

How To Uninstall librdkafka on Rocky Linux 8

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

sudo dnf remove librdkafka

librdkafka Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/0a
/usr/lib/.build-id/0a/e06d11a98f7175a3bc922858774d75fc8210c3
/usr/lib/.build-id/f9
/usr/lib/.build-id/f9/4b763f4afce79707dccd6cb0374a3910d45697
/usr/lib/librdkafka++.so.1
/usr/lib/librdkafka.so.1
/usr/share/doc/librdkafka
/usr/share/doc/librdkafka/CONFIGURATION.md
/usr/share/doc/librdkafka/INTRODUCTION.md
/usr/share/doc/librdkafka/README.md
/usr/share/licenses/librdkafka
/usr/share/licenses/librdkafka/LICENSE
/usr/share/licenses/librdkafka/LICENSE.pycrc
/usr/share/licenses/librdkafka/LICENSE.snappy
/usr/lib/.build-id
/usr/lib/.build-id/82
/usr/lib/.build-id/82/9e42cb9a8201b9f5d5a3ffbc4176f38e1cca4b
/usr/lib/.build-id/9a
/usr/lib/.build-id/9a/d354ee6b229b7fd8ad64a9ddcba54b0dfdc833
/usr/lib64/librdkafka++.so.1
/usr/lib64/librdkafka.so.1
/usr/share/doc/librdkafka
/usr/share/doc/librdkafka/CONFIGURATION.md
/usr/share/doc/librdkafka/INTRODUCTION.md
/usr/share/doc/librdkafka/README.md
/usr/share/licenses/librdkafka
/usr/share/licenses/librdkafka/LICENSE
/usr/share/licenses/librdkafka/LICENSE.pycrc
/usr/share/licenses/librdkafka/LICENSE.snappy

References

Summary

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