«

»

Nov 05

Installing Perl modules

When running Perl script under fresh Linux system, many of Linux users experience error message called “Can’t locate … in @INC (@INC contains:” . It means Pearl executor is unable to find required Perl module. It may be due to broken Perl module, but most of the time fresh Linux OS only installed few essentials modules by default. Here I’m going to describe how to fix that error by installing Perl modules which is  needed for Perl script. You can install Perl module manually but it is bit hard and time consuming thing 🙂 , instead automatically process is recommended. Following steps are for Centos, RHEL based system, however logic is similar for any UNIX distribution.

1) Installing CPAN

2) Installing Perl modules

You can keep default settings like below.

 

3) Example Perl module installation

Example error :-

Can’t locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5

Error message clearly indicate system is missing this “ExtUtils/MakeMaker.pm” module. So let’s look at how to fix it.
inside CPAN shell type following command.That’s it see you soon !!

 

Leave Your Thought Here