How To Install libtie-refhash-weak-perl on Ubuntu 18.04

In this tutorial we learn how to install libtie-refhash-weak-perl on Ubuntu 18.04. libtie-refhash-weak-perl is Tie

Introduction

In this tutorial we learn how to install libtie-refhash-weak-perl on Ubuntu 18.04.

What is libtie-refhash-weak-perl

libtie-refhash-weak-perl is:

Tie::RefHash can be used to access hashes by reference. This is useful when you index by object, for example.

The problem with Tie::RefHash, and cross indexing, is that sometimes the index should not contain strong references to the objecs. The internal structures of Tie::RefHash contain strong references to the key, and provide no convenient means to make those references weak.

This subclass of Tie::RefHash has weak keys, instead of strong ones. The values are left unaltered, and you’ll have to make sure there are no strong references there yourself.

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

sudo apt-get -y install libtie-refhash-weak-perl

Install libtie-refhash-weak-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libtie-refhash-weak-perl

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

sudo aptitude -y install libtie-refhash-weak-perl

How To Uninstall libtie-refhash-weak-perl on Ubuntu 18.04

To uninstall only the libtie-refhash-weak-perl package we can use the following command:

sudo apt-get remove libtie-refhash-weak-perl

Uninstall libtie-refhash-weak-perl And Its Dependencies

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

sudo apt-get -y autoremove libtie-refhash-weak-perl

Remove libtie-refhash-weak-perl Configurations and Data

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

sudo apt-get -y purge libtie-refhash-weak-perl

Remove libtie-refhash-weak-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libtie-refhash-weak-perl

References

Summary

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