Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib/perl5 /usr/local/share/perl5

I tried to install some modules to a new server (fedora core 18) but I'm getting this error:

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.

The module I need to install is : XML/Writer.pm

because I'm getting this error:

Can't locate XML/Writer.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 .

Do any of you know why, or how can I fix these errors?

like image 971
HelenaM Avatar asked May 01 '13 15:05

HelenaM


1 Answers

Some OS distributions cut out pieces of the core Perl distributions. In this case, it appears that the very tool to install modules was gutted out, so you need to get the OS to install it.

Try to install CPAN using

yum -y install perl-CPAN

and then use cpan command to install the required modules

cpan XML::Writer
like image 182
Miguel Prz Avatar answered Nov 14 '22 17:11

Miguel Prz