How To Install libbest-perl on Ubuntu 18.04

In this tutorial we learn how to install libbest-perl on Ubuntu 18.04. libbest-perl is fallbackable module loader

Introduction

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

What is libbest-perl

libbest-perl is:

Best.pm attempts to load Perl modules from a list, stopping at the first successful load and failing only if no alternative was found.

Often there are several possible providers of some functionality your program needs, but you don’t know which is available at the run site. For example, one of the modules may be implemented with XS, or not in the core Perl distribution and thus not necessarily installed. With Best.pm, this can be as simple as:

use Best qw/YAML::Syck YAML/;

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

sudo apt-get -y install libbest-perl

Install libbest-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libbest-perl

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

sudo aptitude -y install libbest-perl

How To Uninstall libbest-perl on Ubuntu 18.04

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

sudo apt-get remove libbest-perl

Uninstall libbest-perl And Its Dependencies

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

sudo apt-get -y autoremove libbest-perl

Remove libbest-perl Configurations and Data

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

sudo apt-get -y purge libbest-perl

Remove libbest-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libbest-perl

References

Summary

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