1
我跟着最投票回答的說明這個問題How can I install a CPAN module into a local directory?,基本上說,我可以配置CPAN與本地安裝的模塊:CPAN忽略makepl_arg和mbuild_arg
% cpan
cpan> o conf makepl_arg INSTALL_BASE=/mydir/perl
cpan> o conf commit
cpan> o conf mbuild_arg '--install_base /mydir/perl'
cpan> o conf commit
然而,當我嘗試
% cpan
% install List::Gen
我的安裝失敗(它看起來像CPAN仍嘗試在系統路徑上安裝)。爲什麼?
cpan[4]> install List::Gen
Going to read '/home/XXXX/.cpan/Metadata'
Database was generated on Mon, 04 Feb 2013 18:41:02 GMT
Running install for module 'List::Gen'
Running make for A/AS/ASG/List-Gen-0.974.tar.gz
Checksum for /home/XXXX/.cpan/sources/authors/id/A/AS/ASG/List-Gen-0.974
.tar.gz ok
Scanning cache /home/XXXX/.cpan/build for sizes
............................................................................
DONE
/bin/tar: Read 9216 bytes from -
CPAN.pm: Going to build A/AS/ASG/List-Gen-0.974.tar.gz
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'List-Gen' version '0.974'
Building List-Gen
ASG/List-Gen-0.974.tar.gz
./Build --install_base /mydir/perl --install_base /mydir/perl -- OK
Running Build test
t/00-load.t ............... 1/1 # Testing List::Gen 0.974, Perl 5.014001, /SOME_SYSTEM_PATH/perl-5.14.1-x86_64/bin/perl
t/00-load.t ............... ok
t/01-load.t ............... ok
t/02-load.t ............... ok
t/03-load.t ............... ok
t/04-load.t ............... ok
t/05-load.t ............... ok
t/06-load.t ............... ok
t/listgen.t ............... ok
t/listgen_builtins.t ...... ok
t/listgen_lazy.t .......... ok
t/listgen_lazy_haskell.t .. ok
t/listgen_ops.t ........... ok
t/listgen_perl6.t ......... ok
t/listgenerator.t ......... ok
t/pod-coverage.t .......... skipped: Test::Pod::Coverage 1.08 required for t
esting POD coverage
t/pod.t ................... ok
t/threads.t ............... skipped: threads not yet supported in perl 5.13+
All tests successful.
Files=17, Tests=1614, 6 wallclock secs (0.20 usr 0.11 sys + 3.12 cusr 0
.60 csys = 4.03 CPU)
Result: PASS
ASG/List-Gen-0.974.tar.gz
./Build test -- OK
Running Build install
Building List-Gen
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/SOME_SYSTEM_PATH/perl-5.14.1-x86_64/lib/site_perl/5.14.1/List'
mkdir /SOME_SYSTEM_PATH/perl-5.14.1-x86_64/lib/site_perl/5.14.1/List: Permission denied a
t /SOME_SYSTEM_PATH/perl-5.14.1-x86_64/lib/5.14.1/ExtUtils/Install.pm line 494.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at /SOME_SYSTEM_PATH/perl-5.14.1-x86_64/lib/site_perl/5.14.1/Module/Build/Base.pm line 3
581.
ASG/List-Gen-0.974.tar.gz
./Build install -- NOT OK
Failed during this command:
ASG/List-Gen-0.974.tar.gz : install NO
您可以顯示'Build.PL'命令? – ikegami