1

有没有办法使用 perl 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。

4

1 回答 1

3

这个特定的依赖错误应该在 中修复1.000000,即 perl 5.10 上的 dep 已被删除。

https://metacpan.org/source/KENTNL/Path-IsDev-1.000000/Changes#L51

尽管依赖本身的原因实际上是“旧的 perls 不太支持三部分版本”。

代码中没有任何东西明确需要它,但它更多的是支持的前向声明。Perl 5.8 早就死了,你真的应该尽你所能摆脱对它的依赖。

I have in fact planned on scrapping the 3-part versioning for Path::FindDev soon, its in need of some serious overhauls because it just sucks right now, and when the version goes 1.000000 sometime in the next week or so, the perl dependency should similarly drop.

Though, if you want an interim solution:

cpanm --prompt Path::IsDev Path::FindDev

And then press "y" when it asks if you want to build anyway.

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
于 2013-10-22T00:41:40.213 回答