How To Install libxml2 on CentOS 8
Introduction
In this tutorial we learn how to install libxml2
on CentOS 8.
What is libxml2
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. libxml2 2.9.7 9.el8_4.2 i686 741 k libxml2-2.9.7-9.el8_4.2.src.rpm baseos Library providing XML and HTML support http MIT 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. libxml2 2.9.7 9.el8_4.2 x86_64 696 k libxml2-2.9.7-9.el8_4.2.src.rpm baseos Library providing XML and HTML support http MIT 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
or dnf
to install libxml2
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install libxml2.
Install libxml2 on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install libxml2
using dnf
by running the following command:
sudo dnf -y install libxml2
Install libxml2 on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install libxml2
using yum
by running the following command:
sudo yum -y install libxml2
How To Uninstall libxml2 on CentOS 8
To uninstall only the libxml2
package we can use the following command:
sudo dnf remove libxml2
libxml2 Package Contents on CentOS 8
/usr/bin/xmlcatalog
/usr/bin/xmllint
/usr/lib/.build-id
/usr/lib/.build-id/0d
/usr/lib/.build-id/0d/381b8716133d1e6745165ad022835207f6eb28
/usr/lib/.build-id/47
/usr/lib/.build-id/47/25fab76e7fd6b073a92c997cf5ffd5385bcb07
/usr/lib/.build-id/83
/usr/lib/.build-id/83/b7a949c59104dc039a9a0da81455d1061e9e2a
/usr/lib64/libxml2.so.2
/usr/lib64/libxml2.so.2.9.7
/usr/share/doc/libxml2
/usr/share/doc/libxml2/AUTHORS
/usr/share/doc/libxml2/NEWS
/usr/share/doc/libxml2/README
/usr/share/doc/libxml2/TODO
/usr/share/licenses/libxml2
/usr/share/licenses/libxml2/Copyright
/usr/share/man/man1/xmlcatalog.1.gz
/usr/share/man/man1/xmllint.1.gz
/usr/share/man/man3/libxml.3.gz
/usr/bin/xmlcatalog
/usr/bin/xmllint
/usr/lib/.build-id
/usr/lib/.build-id/2d
/usr/lib/.build-id/2d/8d034c327ba8fe2d0c658efec029665b3edc8a
/usr/lib/.build-id/4d
/usr/lib/.build-id/4d/ca2ae4586868d1db2b6f95a48ebb0794eff57e
/usr/lib/.build-id/d2
/usr/lib/.build-id/d2/1382cd2932b94fb0ecf1527be2e61155d8c70c
/usr/lib64/libxml2.so.2
/usr/lib64/libxml2.so.2.9.7
/usr/share/doc/libxml2
/usr/share/doc/libxml2/AUTHORS
/usr/share/doc/libxml2/NEWS
/usr/share/doc/libxml2/README
/usr/share/doc/libxml2/TODO
/usr/share/licenses/libxml2
/usr/share/licenses/libxml2/Copyright
/usr/share/man/man1/xmlcatalog.1.gz
/usr/share/man/man1/xmllint.1.gz
/usr/share/man/man3/libxml.3.gz
/usr/bin/xmlcatalog
/usr/bin/xmllint
/usr/lib/.build-id
/usr/lib/.build-id/5b
/usr/lib/.build-id/5b/b07740cb560cfe39825fa2e22a6559e043648c
/usr/lib/.build-id/a6
/usr/lib/.build-id/a6/d88d19ecdc1184a1cb927bcf1be050ab2dd77f
/usr/lib/.build-id/ef
/usr/lib/.build-id/ef/e23bef413ea20274332cdb7c54d670a54af6f4
/usr/lib/libxml2.so.2
/usr/lib/libxml2.so.2.9.7
/usr/share/doc/libxml2
/usr/share/doc/libxml2/AUTHORS
/usr/share/doc/libxml2/NEWS
/usr/share/doc/libxml2/README
/usr/share/doc/libxml2/TODO
/usr/share/licenses/libxml2
/usr/share/licenses/libxml2/Copyright
/usr/share/man/man1/xmlcatalog.1.gz
/usr/share/man/man1/xmllint.1.gz
/usr/share/man/man3/libxml.3.gz
/usr/bin/xmlcatalog
/usr/bin/xmllint
/usr/lib/.build-id
/usr/lib/.build-id/6b
/usr/lib/.build-id/6b/c60b782053609027353a295569188998399566
/usr/lib/.build-id/d0
/usr/lib/.build-id/d0/ac209c16a2527f5f7bd7ab55b6af70be9e8e33
/usr/lib/.build-id/fc
/usr/lib/.build-id/fc/cd81c9fbfc01f15e1310c9c25adccc87eb3ca6
/usr/lib/libxml2.so.2
/usr/lib/libxml2.so.2.9.7
/usr/share/doc/libxml2
/usr/share/doc/libxml2/AUTHORS
/usr/share/doc/libxml2/NEWS
/usr/share/doc/libxml2/README
/usr/share/doc/libxml2/TODO
/usr/share/licenses/libxml2
/usr/share/licenses/libxml2/Copyright
/usr/share/man/man1/xmlcatalog.1.gz
/usr/share/man/man1/xmllint.1.gz
/usr/share/man/man3/libxml.3.gz
References
- [libxml2 website](http://xmlsoft.org/ http://xmlsoft.org/ http://xmlsoft.org/)
Summary
In this tutorial we learn how to install libxml2
on CentOS 8 using yum and dnf.