我以爲我有它的工作。私人perlbrew和CPAN無法正常工作。仍然。
我有一個完全私有版本的Perl 5.16(私有我的意思是本地到我的主目錄),併爲CPAN模塊的私人場所。我遵循http://blog.fox.geek.nz/2010/09/installing-multiple-perls-with.html(針對其輕微的過期問題進行了調整)的指示,聲稱完全避開了對local :: lib的需要。我使用了上述instrux安裝的cpanm來安裝Cache :: Memcached :: Fast.pm,併成功運行了一個使用此模塊的Perl程序。
今天它不工作。
Can't locate Cache/Memcached/Fast.pm in @INC (@INC contains:
/Users/chap/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.1/darwin-2level
/Users/chap/perl5/perlbrew/perls/perl-5.16.1/lib/site_perl/5.16.
/Users/chap/perl5/perlbrew/perls/perl-5.16.1/lib/5.16.1/darwin-2level
/Users/chap/perl5/perlbrew/perls/perl-5.16.1/lib/5.16.1 .) at ./memget line 11.
一些故障排除:
/Users/chap$ perlbrew use
Currently using perl-5.16.1
...甜蜜。
/Users/chap$ which perl
/Users/chap/perl5/perlbrew/perls/perl-5.16.1/bin/perl
...太棒了。
/Users/chap$ perlbrew switch perl-5.16.1
/Users/chap$ cpanm --interactive -v App::cpanoutdated
cpanm (App::cpanminus) 1.5014 on perl 5.012004 built for darwin-thread-multi-2level
Work directory is /Users/chap/.cpanm/work/1350175791.76873
You have make /usr/bin/make
You have LWP 6.03
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3
You have /usr/bin/unzip
Searching App::cpanoutdated on cpanmetadb ...
!
! Can't write to /Library/Perl/5.12 and /usr/local/bin: Installing modules to /Users/chap/perl5
! To turn off this warning, you have to do one of the following:
! - run me as a root or with --sudo option (to install to /Library/Perl/5.12 and /usr/local/bin)
! - Configure local::lib your existing local::lib in this shell to set PERL_MM_OPT etc.
! - Install local::lib by running the following commands
!
! cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
!
Checking if you have ExtUtils::MakeMaker 6.31 ... Yes (6.62)
Checking if you have ExtUtils::Install 1.46 ... Yes (1.55)
App::cpanoutdated is up to date. (0.23)
呃哦。爲什麼系統Perl?