【问题标题】:Which modules are missed?错过了哪些模块?
【发布时间】:2018-10-06 08:03:32
【问题描述】:

在我的系统上:

$ uname -ra
Linux web.feel-safe.net 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux

安装模块时出现下一个错误:

Can't locate inc/ExtUtils/MY_Metafile.pm in @INC (you may need to install the inc::ExtUtils::MY_Metafile module) (@INC contains: /home/feelsafe/web/local/lib/perl5/x86_64-linux-gnu-thread-multi /home/feelsafe/web/local/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at Makefile.PL line 4.
BEGIN failed--compilation aborted at Makefile.PL line 4.

.

Configuring List-MoreUtils-0.416
Running Makefile.PL
Can't locate inc/latest.pm in @INC (you may need to install the inc::latest module) (@INC contains: /home/feelsafe/web/local/lib/perl5/x86_64-linux-gnu-thread-multi /home/feelsafe/web
/local/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/per
l/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at Makefile.PL line 51.
BEGIN failed--compilation aborted at Makefile.PL line 51.

.

Configuring MRO-Compat-0.12
Running Makefile.PL
Can't locate inc/Module/Install.pm in @INC (you may need to install the inc::Module::Install module) (@INC contains: /home/feelsafe/web/local/lib/perl5/x86_64-linux-gnu-thread-multi /home/feelsafe/web/local/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at Makefile.PL line 1.
BEGIN failed--compilation aborted at Makefile.PL line 1.
-> N/A
-> FAIL Configure failed for MRO-Compat-0.12. See /home/feelsafe/.cpanm/work/1524673518.17946/build.log for details.

目前我找到了this的文章,但还是不明白问题所在。

我的系统遗漏了什么?还有什么问题?

【问题讨论】:

  • 此系统上的 Perl 安装已损坏。尝试构建您的 perl,并使用它来安装您需要的任何模块。

标签: perl cpan


【解决方案1】:

因为我使用Carton 来部署我的应用程序:

carton install --deployment

我的cpanfile.snapshot 中有List-MoreUtils-0.416。因此,我使用依赖于“。”的旧模块版本。存在于@INC

但是在我遇到Can't locate inc/latest.pm in @INC 问题的目标主机上,DEBIAN perl-5.24.1 应用了来自perl-5.26 的补丁,它删除了'.'。来自@INC

因为这个inc::latest 在捆绑目录中找不到

为了解决我的问题,我只需在cpanfile 中添加下一行:

requires 'List::MoreUtils', '>=0.428'

很遗憾,carton update 没有更新来自 cpanfile.snapshot 的所有模块,只是在 cpanfile 中提到。

另外,我想,安装inc::latest就可以了

【讨论】:

    【解决方案2】:

    您可能正在使用“系统”perl (cf.perlbrew),其中%INC 中的库路径假定模块是使用操作系统的包管理器安装的。

    在构建模块时,有时使用本地构建的perllocal::lib 之类的模块“引导”实用程序或perlbrew 来管理perl 的“非系统”实例会更容易。这使您可以轻松避免将操作系统安装的模块包与您自己本地构建的模块混合在一起。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-16
      • 2017-12-18
      • 1970-01-01
      • 2010-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-10
      相关资源
      最近更新 更多