How To Install libmath-random-perl on Ubuntu 18.04

In this tutorial we learn how to install libmath-random-perl on Ubuntu 18.04. libmath-random-perl is Perl collection of random number generators

Introduction

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

What is libmath-random-perl

libmath-random-perl is:

Math::Random is a Perl port of the C version of randlib, which is a suite of routines for generating random deviates. This supports all the distributions from which the Fortran and C versions generate deviates. Some features are excluded including the multiple generators/splitting facility and antithetic random number generation. These, along with some of the distributions which are included, are probably not of interest except to the very sophisticated user.

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

sudo apt-get -y install libmath-random-perl

Install libmath-random-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libmath-random-perl

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

sudo aptitude -y install libmath-random-perl

How To Uninstall libmath-random-perl on Ubuntu 18.04

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

sudo apt-get remove libmath-random-perl

Uninstall libmath-random-perl And Its Dependencies

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

sudo apt-get -y autoremove libmath-random-perl

Remove libmath-random-perl Configurations and Data

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

sudo apt-get -y purge libmath-random-perl

Remove libmath-random-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libmath-random-perl

References

Summary

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