3

According to the man page,

cpanm -L extlib Plack # install Plack and all non-core deps into extlib

So I tried to install Parallel::ForkManager like so:

# cpanm -L extlib Parallel::ForkManager
==> Found dependencies: ExtUtils::MakeMaker
--> Working on ExtUtils::MakeMaker
Fetching http://www.cpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-6.98.tar.gz ... OK
Configuring ExtUtils-MakeMaker-6.98 ... OK
==> Found dependencies: File::Spec, Pod::Man, Data::Dumper
--> Working on File::Spec
Fetching http://www.cpan.org/authors/id/S/SM/SMUELLER/PathTools-3.47.tar.gz ... OK
==> Found dependencies: ExtUtils::MakeMaker
! Installing the dependencies failed: Module 'ExtUtils::MakeMaker' is not installed
! Bailing out the installation for PathTools-3.47.
--> Working on Pod::Man
Fetching http://www.cpan.org/authors/id/R/RR/RRA/podlators-2.5.3.tar.gz ... OK
==> Found dependencies: ExtUtils::MakeMaker
! Installing the dependencies failed: Module 'ExtUtils::MakeMaker' is not installed
! Bailing out the installation for podlators-v2.5.3.
--> Working on Data::Dumper
Fetching http://www.cpan.org/authors/id/S/SM/SMUELLER/Data-Dumper-2.151.tar.gz ... OK
==> Found dependencies: ExtUtils::MakeMaker
! Installing the dependencies failed: Module 'ExtUtils::MakeMaker' is not installed
! Bailing out the installation for Data-Dumper-2.151.
! Installing the dependencies failed: Module 'Data::Dumper' is not installed, Module 'File::Spec' is not installed, Module 'Pod::Man' is not installed
! Bailing out the installation for ExtUtils-MakeMaker-6.98.
--> Working on Parallel::ForkManager
Fetching http://www.cpan.org/authors/id/S/SZ/SZABGAB/Parallel-ForkManager-1.06.tar.gz ... OK
==> Found dependencies: ExtUtils::MakeMaker
! Installing the dependencies failed: Module 'ExtUtils::MakeMaker' is not installed
! Bailing out the installation for Parallel-ForkManager-1.06.

What I don't understand is why it is trying to install core deps, when the man page says non-core deps. The real impact I'm having is FPM which uses cpanm underneath with -L flag. Because of this failure, I cannot convert CPAN packages to RPMs.

# /usr/local/bin/cpanm --version
cpanm (App::cpanminus) version 1.7004 (/usr/local/bin/cpanm)
perl version 5.018002 (/usr/bin/perl)

  %Config:
    archname=x86_64-linux-thread-multi
    installsitelib=/usr/local/share/perl5
    installsitebin=/usr/local/bin
    installman1dir=/usr/share/man/man1
    installman3dir=/usr/share/man/man3
    sitelibexp=/usr/local/share/perl5
    archlibexp=/usr/lib64/perl5
    privlibexp=/usr/share/perl5
  %ENV:
  @INC:
    FatPacked::24415496=HASH(0x1748d08)
    /usr/local/lib64/perl5
    /usr/local/share/perl5
    /usr/lib64/perl5/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib64/perl5
    /usr/share/perl5
    .

Has anyone run into the same issue / found a solution?

Marseille07
  • 107
  • 1
  • 8
  • Where is ExtUtils::MakeMaker installed (location of `MakeMaker.pm`)? – hobbs Aug 02 '14 at 02:55
  • I think this is it: $ perldoc -l ExtUtils::MakeMaker /usr/local/share/perl5/ExtUtils/MakeMaker.pm – Marseille07 Aug 02 '14 at 03:35
  • 1
    That's in your sitelib directory, which isn't considered a "core module path", so it's not found. I suspect that whoever packaged your perl did something improper by putting core modules in a non-core location. – hobbs Aug 02 '14 at 04:19
  • Thanks for your response. I wasn't aware there was a thing called core module path, as I took "core deps" to mean core modules, which MakeMaker is. Let me play with the path of MakeMaker.pm and see if that moves things forward. – Marseille07 Aug 02 '14 at 04:40
  • 2
    the `-L` option works by restricting the library search path to the `local::lib` you specify plus your perl's `privlibexp` and `archlibexp` paths, which is where the core modules are expected to be installed. – hobbs Aug 02 '14 at 04:45
  • I see. I am starting to think that this might be a bug on FPM side, as running the command this, which doesn't seem valid: $ /usr/local/bin/fpm -s cpan -t rpm Parallel::ForkManager Process failed: cpanm failed (exit code 1). Full command was:["cpanm", "-L", "/tmp/package-cpan-build20140801-5504-w6xcvo/cpan", "/tmp/package-cpan-build20140801-5504-w6xcvo/module", "-n"] {:level=>:error} – Marseille07 Aug 02 '14 at 04:52
  • Thank you for your help, I will follow up with FPM folks as I think cpanm side is clear. I've been on Perl for a while and still learning new things from the guru's :-) – Marseille07 Aug 02 '14 at 04:53

1 Answers1

2

I just ran into this problem on a CentOS 7.x box.

I managed to get around the problem by switching the -L to -l (lowercase L) to install ExtUtils::MakeMaker and its dependencies, then switching back to using -L for the other modules that I was installing.

update: it seems that the -l trick only works when you're not up-to-date on the module in question. In that case, you'll want to use -l /path/to/install/to --force.

Joe
  • 2,547
  • 1
  • 18
  • 27