How To Install libinternals-perl on Ubuntu 18.04

In this tutorial we learn how to install libinternals-perl on Ubuntu 18.04. libinternals-perl is Perl module for write-protecting variables and manipulating refcounts

Introduction

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

What is libinternals-perl

libinternals-perl is:

Internals allows you to write-protect and write-enable your Perl variables, objects and data structures.

Moreover, the reference count of any Perl variable can be read and set.

You can never pass the object directly on which to perform the desired action, you always have to pass a reference to the variable or data structure in question.

This comes in handy for objects and anonymous data structures, where you only have a reference anyway!

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

sudo apt-get -y install libinternals-perl

Install libinternals-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libinternals-perl

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

sudo aptitude -y install libinternals-perl

How To Uninstall libinternals-perl on Ubuntu 18.04

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

sudo apt-get remove libinternals-perl

Uninstall libinternals-perl And Its Dependencies

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

sudo apt-get -y autoremove libinternals-perl

Remove libinternals-perl Configurations and Data

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

sudo apt-get -y purge libinternals-perl

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

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

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

References

Summary

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