cpanm -L坏了吗?

时间:2014-08-02 02:44:35

标签: 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 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.

我不明白为什么它会尝试安装核心deps,当手册页显示非核心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
    .

有没有人遇到同样的问题/找到解决方案?

1 个答案:

答案 0 :(得分:0)

我刚刚在CentOS 7.x盒子上遇到过这个问题。

我设法通过将-L切换为-l(小写L)来安装ExtUtils::MakeMaker及其依赖项,然后切换回使用-L来解决问题我正在安装的其他模块。

更新:似乎-l技巧仅在您未对相关模块进行更新时才有效。在这种情况下,您需要使用-l /path/to/install/to --force