Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Guys,

Getting error:

'Can't locate CPAN.pm in @INC (@INC contains: inc /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl/usr/share/perl5 .) at inc/Module/AutoInstall.pm line 277.'

using

mock -r epel-6-x86_64 --no-clean /home/chris/RPM/SRPMS/perl-POE-Filter-DHCPd-Lease-0.0502-1.el6.src.rpm

The weird thing is that this happens even after uninstalling, re-installing, init-ing mock.
AND CPAN.pm is there in /usr/share/perl5

Anybody got any solns; really need this for work. Tried Google but can't really find anything specific to this.

Cheers
Chris

  • Comment on Can't locate CPAN.pm in @INC, but it is there

Replies are listed 'Best First'.
Re: Can't locate CPAN.pm in @INC, but it is there
by toolic (Bishop) on Oct 29, 2013 at 23:53 UTC
    CPAN.pm is there in /usr/share/perl5
    But, /usr/share/perl5 is not in @INC:
    inc /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl/usr/share/perl5 .
Re: Can't locate CPAN.pm in @INC, but it is there
by Bloodnok (Vicar) on Oct 30, 2013 at 12:47 UTC
    As toolic points out, the path /usr/share/perl5 isn't in @INC as a separate path, but it _is_ catenated onto /usr/lib64/perl - I should have a look into how @INC is manipulated...

    A user level that continues to overstate my experience :-))