How To Install php-masterminds-html5 on CentOS 7

In this tutorial we learn how to install php-masterminds-html5 on CentOS 7. php-masterminds-html5 is An HTML5 parser and serializer

Introduction

In this tutorial we learn how to install php-masterminds-html5 on CentOS 7.

What is php-masterminds-html5

The need for an HTML5 parser in PHP is clear. This project initially began with the seemingly abandoned html5lib project original source. But after some initial refactoring work, we began a new parser. * An HTML5 serializer * Support for PHP namespaces * Composer support * Event-based (SAX-like) parser * DOM tree builder * Interoperability with QueryPath

We can use yum or dnf to install php-masterminds-html5 on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install php-masterminds-html5.

Install php-masterminds-html5 on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install php-masterminds-html5 using yum by running the following command:

sudo yum -y install php-masterminds-html5

Install php-masterminds-html5 on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install php-masterminds-html5 using dnf by running the following command:

sudo dnf -y install php-masterminds-html5

How To Uninstall php-masterminds-html5 on CentOS 7

To uninstall only the php-masterminds-html5 package we can use the following command:

sudo dnf remove php-masterminds-html5

References

Summary

In this tutorial we learn how to install php-masterminds-html5 on CentOS 7 using yum and dnf.