Eugen Konkov
Eugen Konkov

Reputation: 25153

Which modules are missed?

On my system:

$ 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

I get next errors while installing modules:

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.

Currently I have found this article, but still do not understand the problem.

What did I miss on my system? And what is the problem?

Upvotes: 1

Views: 450

Answers (2)

Eugen Konkov
Eugen Konkov

Reputation: 25153

Because I use Carton to deploy my application:

carton install --deployment

I have List-MoreUtils-0.416 in my cpanfile.snapshot. Thus I use old module version which relies on "." exists at @INC.

But on target host, where I was faced into Can't locate inc/latest.pm in @INC problem there is DEBIAN perl-5.24.1 which apply patch from perl-5.26 which removes '.' from @INC

Because of this inc::latest is not found in bundled directory

To resolve my issue I just add next line into cpanfile:

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

Unfortunately carton update do not update all modules from cpanfile.snapshot just only mentioned at cpanfile.

Also, I think, it will be OK to install inc::latest

Upvotes: 1

G. Cito
G. Cito

Reputation: 6378

You may be using the "system" perl (cf. perlbrew) where the library paths in %INC assume modules are installed using the operating system's package manager.

When building modules it's sometimes easier to use a locally built perl, a module "bootstrapping" utility like local::lib, or perlbrew to manage your "non-system" instance of perl. This allows you to easily avoid mixing module packages installed by the OS with your own locally built modules.

Upvotes: 0

Related Questions