Perl cpanm-L坏了吗?
根据手册Perl cpanm-L坏了吗?,perl,cpanm,Perl,Cpanm,根据手册 cpanm -L extlib Plack # install Plack and all non-core deps into extlib 因此,我尝试安装Parallel::ForkManager,如下所示: # cpanm -L extlib Parallel::ForkManager ==> Found dependencies: ExtUtils::MakeMaker --> Working on ExtUtils::MakeMaker Fetching ht
cpanm -L extlib Plack # install Plack and all non-core deps into extlib
因此,我尝试安装Parallel::ForkManager,如下所示:
# cpanm -L extlib Parallel::ForkManager
==> Found dependencies: ExtUtils::MakeMaker
--> Working on ExtUtils::MakeMaker
Fetching http://www.cpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-6.98.tar.gz ... OK
Configuring ExtUtils-MakeMaker-6.98 ... OK
==> Found dependencies: File::Spec, Pod::Man, Data::Dumper
--> Working on File::Spec
Fetching http://www.cpan.org/authors/id/S/SM/SMUELLER/PathTools-3.47.tar.gz ... OK
==> Found dependencies: ExtUtils::MakeMaker
! Installing the dependencies failed: Module 'ExtUtils::MakeMaker' is not installed
! Bailing out the installation for PathTools-3.47.
--> Working on Pod::Man
Fetching http://www.cpan.org/authors/id/R/RR/RRA/podlators-2.5.3.tar.gz ... OK
==> Found dependencies: ExtUtils::MakeMaker
! Installing the dependencies failed: Module 'ExtUtils::MakeMaker' is not installed
! Bailing out the installation for podlators-v2.5.3.
--> Working on Data::Dumper
Fetching http://www.cpan.org/authors/id/S/SM/SMUELLER/Data-Dumper-2.151.tar.gz ... OK
==> Found dependencies: ExtUtils::MakeMaker
! Installing the dependencies failed: Module 'ExtUtils::MakeMaker' is not installed
! Bailing out the installation for Data-Dumper-2.151.
! Installing the dependencies failed: Module 'Data::Dumper' is not installed, Module 'File::Spec' is not installed, Module 'Pod::Man' is not installed
! Bailing out the installation for ExtUtils-MakeMaker-6.98.
--> Working on Parallel::ForkManager
Fetching http://www.cpan.org/authors/id/S/SZ/SZABGAB/Parallel-ForkManager-1.06.tar.gz ... OK
==> Found dependencies: ExtUtils::MakeMaker
! Installing the dependencies failed: Module 'ExtUtils::MakeMaker' is not installed
! Bailing out the installation for Parallel-ForkManager-1.06.
我不明白的是,为什么它试图安装core deps,而手册页上显示的是非core deps。我真正的影响是FPM,它在-L标志下使用cpanm。由于此故障,我无法将CPAN包转换为RPM
# /usr/local/bin/cpanm --version
cpanm (App::cpanminus) version 1.7004 (/usr/local/bin/cpanm)
perl version 5.018002 (/usr/bin/perl)
%Config:
archname=x86_64-linux-thread-multi
installsitelib=/usr/local/share/perl5
installsitebin=/usr/local/bin
installman1dir=/usr/share/man/man1
installman3dir=/usr/share/man/man3
sitelibexp=/usr/local/share/perl5
archlibexp=/usr/lib64/perl5
privlibexp=/usr/share/perl5
%ENV:
@INC:
FatPacked::24415496=HASH(0x1748d08)
/usr/local/lib64/perl5
/usr/local/share/perl5
/usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib64/perl5
/usr/share/perl5
.
有没有人遇到过同样的问题/找到了解决方案?我刚刚在CentOS 7.x的一个盒子上遇到了这个问题 我通过将
-L
切换到-L
(小写L)来安装ExtUtils::MakeMaker
及其依赖项,然后切换回对我正在安装的其他模块使用-L
,成功地解决了这个问题
更新:似乎
-l
技巧只有在您不了解相关模块的最新信息时才有效。在这种情况下,您需要使用-l/path/to/install/to--force
ExtUtils::MakeMaker安装在哪里(MakeMaker.pm的位置)?我想就是这样:$perldoc-l ExtUtils::MakeMaker/usr/local/share/perl5/ExtUtils/MakeMaker.pm,它在您的sitelb目录中,而不是“核心模块路径”,所以没有找到。我怀疑是谁打包了你的perl,把核心模块放在了一个非核心的位置,做了一些不恰当的事情。谢谢你的回复。我不知道有一个叫做核心模块路径的东西,因为我把“核心deps”理解为核心模块,MakeMaker就是。让我玩一下MakeMaker.pm的路径,看看这是否会使事情向前发展。-L
选项通过将库搜索路径限制为您指定的local::lib
加上perl的privilibexp
和archlibexp
路径来工作,这是预期安装核心模块的地方。