2012-10-14 3 views
0

나는 그것이 효과가 있다고 생각했다.개인용 Perlbrew 및 CPAN이 작동하지 않습니다. 아직도. 다시

전적으로 개인 버전의 Perl 5.16 (개인적으로는 내 홈 디렉토리의 로컬을 의미 함)과 CPAN 모듈 전용 공간이 있습니다. 나는 http://blog.fox.geek.nz/2010/09/installing-multiple-perls-with.html (약간의 out-of-datedness에 대한 조정)의 지시 사항을 따르며, 이는 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 ???

답변

1

6 단계 (각 perl에 대해 'cpanm'설정)를 건너 뛰거나 실행하면 이전에 시스템 perl과 함께 설치된 cpanm을 실행할 수 있으므로 시스템 디렉토리에 쓰기를 원할 수 있습니다.

최근 버전의 perlbrew에는 cpanm을 perl 외부의 특별한 위치에 설치하는 'install-cpanm'명령이 있습니다. 그렇게하면 양조 한 perl마다 cpanm을 설치할 필요가 없습니다. 이것은 당신이 필요로하는 것일 수 있습니다.

1

cpanm 실행 파일의 소스 코드를 확인하는 것이 좋습니다.

cpanm 명령에의 속쓰림이 포함될 수 있습니다. 이 경우 perlbrew switch 또는 perlbrew use은 cpanm 명령을 호출하는 perl의 버전을 변경할 수 없습니다. (하지 않는 한 물론, 당신은 perl /usr/bin/cpanm처럼 모든 시간을 실행합니다.

당신이 동적으로 전환 할 수 /usr/bin/env perl을 말한다 오두막을 포함해야 curl -o cpanm http://cpanmin.us 또는 perlbrew install-cpanm하여 설치를 수행합니다.