I tried to install some modules to a new server (fedora core 18) but I’m getting this error:
JavaScript
x
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:
JavaScript
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?
Advertisement
Answer
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
JavaScript
yum -y install perl-CPAN
and then use cpan
command to install the required modules
JavaScript
cpan XML::Writer