How To Install zlib on Rocky Linux 8

In this tutorial we learn how to install zlib on Rocky Linux 8. zlib is The compression and decompression library

Introduction

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

What is zlib

Zlib is a general-purpose, patent-free, lossless data compression library which is used by many different programs.

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

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

sudo dnf -y install zlib

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

sudo yum -y install zlib

How To Uninstall zlib on Rocky Linux 8

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

sudo dnf remove zlib

zlib Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/b3
/usr/lib/.build-id/b3/26771e00fb0a70aea28153d72daabdb72365ef
/usr/lib/libz.so.1
/usr/lib/libz.so.1.2.11
/usr/share/doc/zlib
/usr/share/doc/zlib/ChangeLog
/usr/share/doc/zlib/FAQ
/usr/share/licenses/zlib
/usr/share/licenses/zlib/README
/usr/lib/.build-id
/usr/lib/.build-id/c3
/usr/lib/.build-id/c3/3b12f33246f670deb034d7aea5d2119ac0c1b3
/usr/lib64/libz.so.1
/usr/lib64/libz.so.1.2.11
/usr/share/doc/zlib
/usr/share/doc/zlib/ChangeLog
/usr/share/doc/zlib/FAQ
/usr/share/licenses/zlib
/usr/share/licenses/zlib/README

References

Summary

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