gpt4 book ai didi

perl - cpan 忽略 makepl_arg 和 mbuild_arg

转载 作者:行者123 更新时间:2023-12-05 04:18:26 25 4
gpt4 key购买 nike

我遵循了这个问题投票最多的答案中的说明 How can I install a CPAN module into a local directory? ,这基本上是说我可以配置 CPAN 以在本地安装模块:

% 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

最佳答案

应该是mbuildpl_arg,不是mbuild_arg

o conf mbuild_arg ''                              # Fix past error
o conf mbuildpl_arg '--install_base /mydir/perl' # Specify install base
o conf commit # Save changes

关于perl - cpan 忽略 makepl_arg 和 mbuild_arg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14698937/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com