How To Install php-sabre-uri on CentOS 7

In this tutorial we learn how to install php-sabre-uri on CentOS 7. php-sabre-uri is Functions for making sense out of URIs

Introduction

In this tutorial we learn how to install php-sabre-uri on CentOS 7.

What is php-sabre-uri

sabre/uri is a lightweight library that provides several functions for working with URIs, staying true to the rules of RFC3986. Partially inspired by Node.js URL library, and created to solve real problems in PHP applications. 100% unitested and many tests are based on examples from RFC3986. The library provides the following functions * resolve to resolve relative urls. * normalize to aid in comparing urls. * parse, which works like PHP’s parse_url. * build to do the exact opposite of parse. * split to easily get the ‘dirname’ and ‘basename’ of a URL without all the problems those two functions have. Autoloader

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

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

sudo yum -y install php-sabre-uri

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

sudo dnf -y install php-sabre-uri

How To Uninstall php-sabre-uri on CentOS 7

To uninstall only the php-sabre-uri package we can use the following command:

sudo dnf remove php-sabre-uri

References

Summary

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