How To Install expat on Rocky Linux 8

In this tutorial we learn how to install expat on Rocky Linux 8. expat is An XML parser library

Introduction

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

What is expat

This is expat, the C library for parsing XML, written by James Clark. Expat is a stream oriented XML parser. This means that you register handlers with the parser prior to starting the parse. These handlers are called when the parser discovers the associated structures in the document being parsed. A start tag is an example of the kind of structures for which you may register handlers.

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

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

sudo dnf -y install expat

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

sudo yum -y install expat

How To Uninstall expat on Rocky Linux 8

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

sudo dnf remove expat

expat Package Contents on Rocky Linux 8

/usr/bin/xmlwf
/usr/lib/.build-id
/usr/lib/.build-id/3c
/usr/lib/.build-id/3c/f85ecb96e4abd4ca00f000970d1f8c89eb6753
/usr/lib/.build-id/bb
/usr/lib/.build-id/bb/0390b9cc18e9a874ffed624b6ec25d5993ebb8
/usr/lib64/libexpat.so.1
/usr/lib64/libexpat.so.1.6.7
/usr/share/doc/expat
/usr/share/doc/expat/AUTHORS
/usr/share/doc/expat/Changes
/usr/share/licenses/expat
/usr/share/licenses/expat/COPYING
/usr/share/man/man1/xmlwf.1.gz
/usr/bin/xmlwf
/usr/lib/.build-id
/usr/lib/.build-id/4e
/usr/lib/.build-id/4e/7f9a71489a9837edca8000874a8f679ea8d464
/usr/lib/.build-id/b4
/usr/lib/.build-id/b4/f126c239c01e5758ef867e9b0a381e88794b3b
/usr/lib/libexpat.so.1
/usr/lib/libexpat.so.1.6.7
/usr/share/doc/expat
/usr/share/doc/expat/AUTHORS
/usr/share/doc/expat/Changes
/usr/share/licenses/expat
/usr/share/licenses/expat/COPYING
/usr/share/man/man1/xmlwf.1.gz

References

Summary

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