Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Dedicated Server FAQ  >  Can’t locate CPAN.pm in @INC
Top Scroll

Can’t locate CPAN.pm in @INC

 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 CPAN.pm 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.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.