How To Install perl-Heap on CentOS 7

In this tutorial we learn how to install perl-Heap on CentOS 7. perl-Heap is Perl extension for keeping data partially sorted

Introduction

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

What is perl-Heap

The Heap collection of modules provide routines that manage a heap of elements. A heap is a partially sorted structure that is always able to easily extract the smallest of the elements in the structure (or the largest if a reversed compare routine is provided). If the collection of elements is changing dynamically, the heap has less overhead than keeping the collection fully sorted. The elements must be objects as described in “Heap elements inserted into one heap must be mutually compatible - either the same class exactly or else classes that differ only in ways unrelated to the Heap

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

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

sudo yum -y install perl-Heap

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

sudo dnf -y install perl-Heap

How To Uninstall perl-Heap on CentOS 7

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

sudo dnf remove perl-Heap

References

Summary

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