How To Install libconfig-model-backend-augeas-perl on Ubuntu 18.04

In this tutorial we learn how to install libconfig-model-backend-augeas-perl on Ubuntu 18.04. libconfig-model-backend-augeas-perl is config-model reader and writer powered by Augeas

Introduction

In this tutorial we learn how to install libconfig-model-backend-augeas-perl on Ubuntu 18.04.

What is libconfig-model-backend-augeas-perl

libconfig-model-backend-augeas-perl is:

Config::Model::Backend::Augeas provides a way to load or store configuration data through Config::Augeas. This way, the structure and comments of the original configuration file are preserved.

With Config::Model::Backend::Augeas, Config::Model now provides a way to load and save data through RedHat’s Augeas library.

Config::Model and Augeas are both configuration editing tool. Both parse configuration files in their native formats and transforms them into a tree. Configuration changes are made by manipulating this tree and saving it back into native config files.

Both Augeas and Config::Model rely on a tree to represent configuration data.

On one side, Augeas is able to load and write data while respecting the structure and comments of the original configuration file. But Augeas purpose is not to validate the semantic content of the configuration file.

On the other side, Config::Model is able to validate the semantic content of the configuration file, but it may discard all comments and will write back configuration data using a canonical order. Thus the structure of the original configuration file is not preserved.

You can now have the best of both worlds by using the Augeas library to load and write data from Config::Model configuration tree. You can now instruct Config::Model to use Augeas. See Config::Model::BackendMgr for details.

Unfortunately, you must ensure that the tree representation specified in Config::Model and Augeas lens are quite close together:

  • Config::Model element names and Augeas lens names must be identical
  • Both structures must be very close. Each Config::Model node must have a corresponding lens.

See Config::Model::Backend::Augeas documentation to use Augeas with your configuration model.

For more details on Config::Model see:

https://github.com/dod38fr/config-model/wiki

For more details on Augeas, see:

http://augeas.net

There are three methods to install libconfig-model-backend-augeas-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-model-backend-augeas-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-model-backend-augeas-perl using apt-get by running the following command:

sudo apt-get -y install libconfig-model-backend-augeas-perl

Install libconfig-model-backend-augeas-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libconfig-model-backend-augeas-perl

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

sudo aptitude -y install libconfig-model-backend-augeas-perl

How To Uninstall libconfig-model-backend-augeas-perl on Ubuntu 18.04

To uninstall only the libconfig-model-backend-augeas-perl package we can use the following command:

sudo apt-get remove libconfig-model-backend-augeas-perl

Uninstall libconfig-model-backend-augeas-perl And Its Dependencies

To uninstall libconfig-model-backend-augeas-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-model-backend-augeas-perl

Remove libconfig-model-backend-augeas-perl Configurations and Data

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

sudo apt-get -y purge libconfig-model-backend-augeas-perl

Remove libconfig-model-backend-augeas-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libconfig-model-backend-augeas-perl

References

Summary

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