Knowledge Base
MilesWeb / Dedicated Server FAQ, VPS FAQ

Can’t locate in @INC

Approx. read time : 2 min

Perl modules can be installed manually OR using CPAN. If you install perl modules using CPAN, it will resolve all dependencies. It works the same way yum does & is very easy to manage perl modules.

# perl -MCPAN -e shell

When trying to use CPAN with command above you will receive an error which states that there is a need to install perl-cpan on the server.

Can’t locate in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .).
BEGIN failed–compilation aborted.

Use yum to install perl-cpan with command below.

# yum install perl-CPAN -y

It will install CPAN & dependent RPM’es required. They are perl-Digest-SHA, perl-ExtUtils-MakeMaker, perl-ExtUtils-ParseXS, perl-Test-Harness, perl-devel. If in case you receive any error, make sure CPAN is installed. With our cPanel shared hosting platform perl v5.8.8 is installed.

Need help? We’re always here for you.