How To Install libconfig-any-perl on Ubuntu 18.04

In this tutorial we learn how to install libconfig-any-perl on Ubuntu 18.04. libconfig-any-perl is module to load configuration from different file formats

Introduction

In this tutorial we learn how to install libconfig-any-perl on Ubuntu 18.04.

What is libconfig-any-perl

libconfig-any-perl is:

Config::Any provides a facility for Perl applications and libraries to load configuration data from multiple different file formats. It supports XML, YAML, JSON, Apache-style configuration, Windows INI files, and even Perl code.

The rationale for this module is as follows: Perl programs are deployed on many different platforms and integrated with many different systems. Systems administrators and end users may prefer different configuration formats than the developers. The flexibility inherent in a multiple format configuration loader allows different users to make different choices, without generating extra work for the developers. As a developer you only need to learn a single interface to be able to use the power of different configuration formats.

There are three methods to install libconfig-any-perl 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 libconfig-any-perl Using apt-get

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

sudo apt-get update

After updating apt database, We can install libconfig-any-perl using apt-get by running the following command:

sudo apt-get -y install libconfig-any-perl

Install libconfig-any-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libconfig-any-perl using apt by running the following command:

sudo apt -y install libconfig-any-perl

Install libconfig-any-perl 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 libconfig-any-perl using aptitude by running the following command:

sudo aptitude -y install libconfig-any-perl

How To Uninstall libconfig-any-perl on Ubuntu 18.04

To uninstall only the libconfig-any-perl package we can use the following command:

sudo apt-get remove libconfig-any-perl

Uninstall libconfig-any-perl And Its Dependencies

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

sudo apt-get -y autoremove libconfig-any-perl

Remove libconfig-any-perl Configurations and Data

To remove libconfig-any-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libconfig-any-perl

Remove libconfig-any-perl configuration, data, and all of its dependencies

We can use the following command to remove libconfig-any-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libconfig-any-perl

References

Summary

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