有没有办法在peros v5.8.8的centos 6.4上安装Perl-Critic-1.119,当我尝试用cpanm时我得到错误:
sudo cpanm Perl::Critic
[sudo] password for kahmed:
--> Working on Perl::Critic
Fetching http://www.cpan.org/authors/id/T/TH/THALJEF/Perl-Critic-1.119.tar.gz ... OK
Configuring Perl-Critic-1.119 ... OK
==> Found dependencies: Pod::Spell
--> Working on Pod::Spell
Fetching http://www.cpan.org/authors/id/X/XE/XENO/Pod-Spell-1.10.tar.gz ... OK
Configuring Pod-Spell-1.10 ... OK
==> Found dependencies: File::ShareDir::ProjectDistDir
--> Working on File::ShareDir::ProjectDistDir
Fetching http://www.cpan.org/authors/id/K/KE/KENTNL/File-ShareDir-ProjectDistDir-0.5.2.tar.gz ... OK
Configuring File-ShareDir-ProjectDistDir-0.5.2 ... OK
==> Found dependencies: Path::IsDev, Path::FindDev
--> Working on Path::IsDev
Fetching http://www.cpan.org/authors/id/K/KE/KENTNL/Path-IsDev-0.6.0.tar.gz ... OK
Configuring Path-IsDev-0.6.0 ... OK
Needs perl v5.10.0, you have 5.008008
! Installing the dependencies failed: Installed version (5.008008) of perl is not in range 'v5.10.0'
! Bailing out the installation for Path-IsDev-0.6.0.
--> Working on Path::FindDev
Fetching http://www.cpan.org/authors/id/K/KE/KENTNL/Path-FindDev-0.4.0.tar.gz ... OK
Configuring Path-FindDev-0.4.0 ... OK
Needs perl v5.10.0, you have 5.008008
==> Found dependencies: Path::IsDev, Path::IsDev::Object
! Installing the dependencies failed: Module 'Path::IsDev' is not installed, Installed version (5.008008) of perl is not in range 'v5.10.0', Module 'Path::IsDev::Object' is not installed
! Bailing out the installation for Path-FindDev-0.4.0.
! Installing the dependencies failed: Module 'Path::IsDev' is not installed, Module 'Path::FindDev' is not installed
! Bailing out the installation for File-ShareDir-ProjectDistDir-0.5.2.
! Installing the dependencies failed: Module 'File::ShareDir::ProjectDistDir' is not installed
! Bailing out the installation for Pod-Spell-1.10.
! Installing the dependencies failed: Module 'Pod::Spell' is not installed
! Bailing out the installation for Perl-Critic-1.119.
我无法升级Perl。
答案 0 :(得分:2)
这个特定的依赖性错误应该在1.000000
中修复,即因为perl 5.10上的dep已被删除。
https://metacpan.org/source/KENTNL/Path-IsDev-1.000000/Changes#L51
虽然依赖本身的原因实际上是“三部分版本在旧版本上没有得到很好的支持”。
代码中没有任何内容明确需要它,但它更多的是前向声明支持。 Perl 5.8已经很久了,你真的应该尽力而为,以取决于它。
我实际上计划尽快废除Path::FindDev
的3部分版本,它需要进行一些严肃的检修,因为它现在很糟糕,当版本在某个时候进入1.000000
时下周左右,perl依赖应该同样下降。
但是,如果你想要一个临时解决方案:
cpanm --prompt Path::IsDev Path::FindDev
然后在询问你是否想要建立的时候按“y”。
cpanm --prompt Path::FindDev
--> Working on Path::FindDev
Fetching http://www.cpan.org/authors/id/K/KE/KENTNL/Path-FindDev-0.4.0.tar.gz ... OK
Configuring Path-FindDev-0.4.0 ... OK
Needs perl v5.10.0, you have 5.008009
! Installing the dependencies failed: Installed version (5.008009) of perl is not in range 'v5.10.0'
Do you want to continue building Path-FindDev-0.4.0 anyway? [n] y
Building and testing Path-FindDev-0.4.0 ... OK
Successfully installed Path-FindDev-0.4.0
1 distribution installed