How To Install libxml2.x86_64 on Amazon Linux 2

In this tutorial we learn how to install libxml2.x86_64 in Amazon Linux 2. libxml2.x86_64 is Library providing XML and HTML support

Introduction

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

What is libxml2.x86_64

This library allows to manipulate XML files. It includes support to read, modify and write XML and HTML files. There is DTDs support this includes parsing and validation even with complex DtDs, either at parse time or later once the document has been modified. The output can be a simple SAX stream or and in-memory DOM like representations. In this case one can use the built-in XPath and XPointer implementation to select sub nodes or ranges. A flexible Input/Output mechanism is available, with existing HTTP and FTP modules and combined to an URI library.

We can use yum to install libxml2.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install libxml2.x86_64.

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

sudo yum -y install libxml2.x86_64

How To Uninstall libxml2.x86_64 on Amazon Linux 2

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

sudo yum remove libxml2.x86_64

libxml2.x86_64 Package Contents on Amazon Linux 2

/usr/bin/xmlcatalog
/usr/bin/xmllint
/usr/lib64/libxml2.so.2
/usr/lib64/libxml2.so.2.9.1
/usr/share/doc/libxml2-2.9.1
/usr/share/doc/libxml2-2.9.1/AUTHORS
/usr/share/doc/libxml2-2.9.1/Copyright
/usr/share/doc/libxml2-2.9.1/NEWS
/usr/share/doc/libxml2-2.9.1/README
/usr/share/doc/libxml2-2.9.1/TODO
/usr/share/man/man1/xmlcatalog.1.gz
/usr/share/man/man1/xmllint.1.gz
/usr/share/man/man3/libxml.3.gz

References

Summary

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