How To Install perl-local-lib on CentOS 7

In this tutorial we learn how to install perl-local-lib on CentOS 7. perl-local-lib is Create and use a local lib/ for perl modules

Introduction

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

What is perl-local-lib

This module provides a quick, convenient way of bootstrapping a user- local Perl module library located within the user’s home directory. It also constructs and prints out for the user the list of environment variables using the syntax appropriate for the user’s current shell (as specified by the ‘SHELL’ environment variable), suitable for directly adding to one’s shell configuration file. More generally, local of a directory containing Perl modules outside of Perl’s ‘@INC’. This makes it easier to ship an application with an app-specific copy of a Perl module, or collection of modules. Useful in cases like when an upstream maintainer hasn’t applied a patch to a module of theirs that you need for your application.

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

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

sudo yum -y install perl-local-lib

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

sudo dnf -y install perl-local-lib

How To Uninstall perl-local-lib on CentOS 7

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

sudo dnf remove perl-local-lib

References

Summary

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