在我的系统上:
$ 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文章,但仍然不明白这个问题。
我的系统错过了什么?问题是什么?
答案 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::lib
或perlbrew
)来管理{的“非系统”实例{ {1}}。这使您可以轻松避免将操作系统安装的模块包与您自己的本地构建模块混合。