How To Install ruby-ox on Ubuntu 18.04

In this tutorial we learn how to install ruby-ox on Ubuntu 18.04. ruby-ox is fast XML parser and object serializer

Introduction

In this tutorial we learn how to install ruby-ox on Ubuntu 18.04.

What is ruby-ox

ruby-ox is:

Optimized XML (Ox), as the name implies, was written to provide speed optimized XML handling. It was designed to be an alternative to Nokogiri and other Ruby XML parsers for generic XML parsing and as an alternative to Marshal for Object serialization.

Ox handles XML documents in three ways: it is a generic XML parser and writer, a fast Object / XML marshaller, and a stream SAX parser. The library is implemented in C for speed and has a lean, simple Ruby API.

There are three methods to install ruby-ox 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 ruby-ox Using apt-get

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

sudo apt-get update

After updating apt database, We can install ruby-ox using apt-get by running the following command:

sudo apt-get -y install ruby-ox

Install ruby-ox Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install ruby-ox using apt by running the following command:

sudo apt -y install ruby-ox

Install ruby-ox 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 ruby-ox using aptitude by running the following command:

sudo aptitude -y install ruby-ox

How To Uninstall ruby-ox on Ubuntu 18.04

To uninstall only the ruby-ox package we can use the following command:

sudo apt-get remove ruby-ox

Uninstall ruby-ox And Its Dependencies

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

sudo apt-get -y autoremove ruby-ox

Remove ruby-ox Configurations and Data

To remove ruby-ox configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge ruby-ox

Remove ruby-ox configuration, data, and all of its dependencies

We can use the following command to remove ruby-ox configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge ruby-ox

References

Summary

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