错过了哪些模块?

时间:2018-04-25 18:32:46

标签: perl cpan

在我的系统上:

$ 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文章,但仍然不明白这个问题。

我的系统错过了什么?问题是什么?

2 个答案:

答案 0 :(得分:1)

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

carton install --deployment

我的List-MoreUtils-0.416中有cpanfile.snapshot。因此,我使用的旧模块版本依赖于"。"存在于@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

是可以的

答案 1 :(得分:0)

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

构建模块时,有时更容易使用本地构建的perl,模块“bootstrapping”实用程序(如local::libperlbrew)来管理{的“非系统”实例{ {1}}。这使您可以轻松避免将操作系统安装的模块包与您自己的本地构建模块混合。