How To Install php-xml-rpc2 on Ubuntu 18.04

In this tutorial we learn how to install php-xml-rpc2 on Ubuntu 18.04. php-xml-rpc2 is PHP XML-RPC client/server library

Introduction

In this tutorial we learn how to install php-xml-rpc2 on Ubuntu 18.04.

What is php-xml-rpc2

php-xml-rpc2 is:

XML_RPC2 is a pear package providing XML_RPC client and server services. XML-RPC is a simple remote procedure call protocol built using HTTP as transport and XML as encoding. As a client library, XML_RPC2 is capable of creating a proxy class which exposes the methods exported by the server. As a server library, XML_RPC2 is capable of exposing methods from a class or object instance, seamlessly exporting local methods as remotely callable procedures.

There are three methods to install php-xml-rpc2 on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install php-xml-rpc2 Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install php-xml-rpc2 using apt-get by running the following command:

sudo apt-get -y install php-xml-rpc2

Install php-xml-rpc2 Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install php-xml-rpc2 using apt by running the following command:

sudo apt -y install php-xml-rpc2

Install php-xml-rpc2 Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install php-xml-rpc2 using aptitude by running the following command:

sudo aptitude -y install php-xml-rpc2

How To Uninstall php-xml-rpc2 on Ubuntu 18.04

To uninstall only the php-xml-rpc2 package we can use the following command:

sudo apt-get remove php-xml-rpc2

Uninstall php-xml-rpc2 And Its Dependencies

To uninstall php-xml-rpc2 and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove php-xml-rpc2

Remove php-xml-rpc2 Configurations and Data

To remove php-xml-rpc2 configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge php-xml-rpc2

Remove php-xml-rpc2 configuration, data, and all of its dependencies

We can use the following command to remove php-xml-rpc2 configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge php-xml-rpc2

References

Summary

In this tutorial we learn how to install php-xml-rpc2 package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.