How To Install libarchive on Rocky Linux 8

In this tutorial we learn how to install libarchive on Rocky Linux 8. libarchive is A library for handling streaming archive formats

Introduction

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

What is libarchive

Libarchive is a programming library that can create and read several different streaming archive formats, including most popular tar variants, several cpio formats, and both BSD and GNU ar variants. It can also write shar archives and read ISO9660 CDROM images and ZIP archives.

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

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

sudo dnf -y install libarchive

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

sudo yum -y install libarchive

How To Uninstall libarchive on Rocky Linux 8

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

sudo dnf remove libarchive

libarchive Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/4a
/usr/lib/.build-id/4a/0aff51a446a9aeb473e02d3fea817b2d23d893
/usr/lib64/libarchive.so.13
/usr/lib64/libarchive.so.13.3.3
/usr/share/doc/libarchive
/usr/share/doc/libarchive/NEWS
/usr/share/doc/libarchive/README.md
/usr/share/licenses/libarchive
/usr/share/licenses/libarchive/COPYING
/usr/share/man/man5/cpio.5.gz
/usr/share/man/man5/mtree.5.gz
/usr/share/man/man5/tar.5.gz
/usr/lib/.build-id
/usr/lib/.build-id/c3
/usr/lib/.build-id/c3/1dd329504791fc0773aeab2755c1ae4e084f51
/usr/lib/libarchive.so.13
/usr/lib/libarchive.so.13.3.3
/usr/share/doc/libarchive
/usr/share/doc/libarchive/NEWS
/usr/share/doc/libarchive/README.md
/usr/share/licenses/libarchive
/usr/share/licenses/libarchive/COPYING
/usr/share/man/man5/cpio.5.gz
/usr/share/man/man5/mtree.5.gz
/usr/share/man/man5/tar.5.gz

References

Summary

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