Can’t locate CAPN.pm in @INC

perl -MCPAN -e shell 
Can’t locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl BEGIN failed–compilation aborted.

Solution:

Go to http://search.cpan.org/~andk/CPAN-1.9301/lib/CPAN.pm Search software

wget http://search.cpan.org/CPAN/authors/id/A/AN/ANDK/CPAN-2.10.tar.gz

tar zxf CPAN-2.10.tar.gz

cd CPAN-2.10

perl Makefile.PL
Importing PAUSE public key into your GnuPG keychain… gpg: new configuration file `/root/.gnupg/gpg.conf’ created
gpg: WARNING: options in `/root/.gnupg/gpg.conf’ are not yet active during this run
done!
(You may wish to trust it locally with ‘gpg –lsign-key 450F89EC’)
Checking if your kit is complete…
Looks good
Warning: prerequisite CPAN::Meta::Requirements 2.121 not found.
Warning: prerequisite Test::More 0 not found.
Writing Makefile for CPAN

go to http://search.cpan.org/~andk/CPAN-1.9301/lib/CPAN.pm   search CPAN::Meta::Requirements  and Test::More

wget http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/CPAN-Meta-Requirements-2.133.tar.gz

tar zxf CPAN-Meta-Requirements-2.133.tar.gz && cd CPAN-Meta-Requirements-2.133

perl Makefile.PL  && make && make install

wget http://search.cpan.org/CPAN/authors/id/E/EX/EXODIST/Test-Simple-1.001014.tar.gz

tar zxf Test-Simple-1.001014.tar.gz &&cd Test-Simple-1.001014

perl Makefile.PL  && make && make install

cd ../CPAN-2.10

perl Makefile.PL  && make && make install

……………

Installing /usr/share/man/man3/App::Cpan.3pm
Installing /usr/share/man/man3/CPAN::FirstTime.3pm
Installing /usr/share/man/man3/CPAN::Nox.3pm
Installing /usr/bin/cpan
Installing /usr/bin/cpan-mirrors
Appending installation info to /usr/lib64/perl5/perllocal.pod

ok!!!!!!

perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell — CPAN exploration and modules installation (v2.10)
Enter ‘h’ for help.

cpan[1]> install DBI

此条目发表在Experience分类目录,贴了, 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注