How To Install perl-Statistics-Basic on CentOS 7

In this tutorial we learn how to install perl-Statistics-Basic on CentOS 7. perl-Statistics-Basic is A collection of very basic statistics modules

Introduction

In this tutorial we learn how to install perl-Statistics-Basic on CentOS 7.

What is perl-Statistics-Basic

use Statistics my $median = median( 1,2,3 ); my $mean = mean( [1,2,3]); # array refs are ok too my $variance = variance( 1,2,3 ); my $stddev = stddev( 1,2,3 ); my $correlation = correlation( [1 .. 3], [1 .. 3] );

We can use yum or dnf to install perl-Statistics-Basic on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install perl-Statistics-Basic.

Install perl-Statistics-Basic on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install perl-Statistics-Basic using yum by running the following command:

sudo yum -y install perl-Statistics-Basic

Install perl-Statistics-Basic on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install perl-Statistics-Basic using dnf by running the following command:

sudo dnf -y install perl-Statistics-Basic

How To Uninstall perl-Statistics-Basic on CentOS 7

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

sudo dnf remove perl-Statistics-Basic

References

Summary

In this tutorial we learn how to install perl-Statistics-Basic on CentOS 7 using yum and dnf.