How To Install perl-JSON-MaybeXS on CentOS 8
Introduction
In this tutorial we learn how to install perl-JSON-MaybeXS on CentOS 8.
What is perl-JSON-MaybeXS
This module first checks to see if either Cpanel is already loaded, in which case it uses that module. Otherwise it tries to load Cpanel either uses the first module it finds or throws an error. It then exports the “encode_json” and “decode_json” functions from the loaded module, along with a “JSON” constant that returns the class name for calling “new” on. If you’re writing fresh code rather than replacing JSON.pm usage, you might want to pass options as constructor args rather than calling mutators, so we provide our own “new” method that supports that.
We can use yum or dnf to install perl-JSON-MaybeXS on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install perl-JSON-MaybeXS.
Install perl-JSON-MaybeXS on CentOS 8 Using yum
Update yum database with yum using the following command.
sudo yum makecache
After updating yum database, We can install perl-JSON-MaybeXS using yum by running the following command:
sudo yum -y install perl-JSON-MaybeXS
Install perl-JSON-MaybeXS on CentOS 8 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 perl-JSON-MaybeXS using dnf by running the following command:
sudo dnf -y install perl-JSON-MaybeXS
How To Uninstall perl-JSON-MaybeXS on CentOS 8
To uninstall only the perl-JSON-MaybeXS package we can use the following command:
sudo dnf remove perl-JSON-MaybeXS
References
Summary
In this tutorial we learn how to install perl-JSON-MaybeXS on CentOS 8 using yum and dnf.