在 centos 6.4 上安装 Perl-Critic-1.119 和 perl v5.8.8



有没有办法在带有 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。

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

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

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

代码中没有任何内容明确需要它,但它更像是向前支持声明。Perl 5.8 早已死了,你真的应该尽一切努力摆脱对它的依赖。

事实上,我计划很快取消 3 部分版本控制,Path::FindDev,它需要进行一些重大的检修,因为它现在很糟糕,当版本在下周左右的某个时候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

相关内容

  • 没有找到相关文章

最新更新