How To Install Perl Modules With CPAN? – POFTUT

How To Install Perl Modules With CPAN?

Perl is an old and popular scripting language. Todays Python is preferred over Perl but there are a lot of useful tools used already by system administrators. There is generally a problem of dependency for Perl scripts. Here we will look at how to install required Perl modules into Linux.

Install Via CPAN

CPAN is a very good solution to install modules. It resolves and installs dependencies easily. CPAN is very easy to use versus installing modules manually.

CentOS, Fedora, Red Hat

We can install CPAN in rpm-based distributions like CentOS, Fedora and Red Hat like below.

Ubuntu, Debian, Mint, Kali

We can use following command in order to install CPAN in deb based distributions like Debian, Ubuntu, Kali, and Mint.

Install CPAN For Ubuntu, Mint, Kali, Debian

Install CPAN For Ubuntu, Mint, Kali, Debian

Install MIME

We have installed the CPAN and we can use CPAN interactive shell in order to install MIME::Lite package. First, we will enter to the CPAN interactive shell.

CPAN Interactive Shell

CPAN Interactive Shell

Install MIME

Install MIME

Install Perl Modules With CPAN From Bash

We can run the installation process without entering CPAN shell-like below.

-i parameter simple provides install command like in CPAN shell.

Install Perl Modules With CPAN From Bash

Install Perl Modules With CPAN From Bash

LEARN MORE  "Perl warning Setting locale failed" Error and Solution In Linux

Leave a Reply

Your email address will not be published. Required fields are marked *