3

I'm trying to install PAR from cpanm like so: cpanm App::Packer::PAR, but it's giving me this error:

skipping R/RJ/RJBS/perl-5.22.0.tar.bz2
! Installing the dependencies failed: Module ExtUtils::Embed is not installed
! Bailing out the installation for PAR-Packer-1.026.

Even though cpanm is supposed to automatically install dependencies, I tried installing it manually: cpanm ExtUtils::Embed, but only got the same error: skipping R/RJ/RJBS/perl-5.22.0.tar.bz2 Any ideas as to why this is failing and how I can make it work?

bsmedley
  • 33
  • 1
  • 4

1 Answers1

5

ExtUtils::Embed is a dual-lifed module, meaning it's distributed as part of the perl distribution as well as in a second distribution.

cpanm is trying to install ExtUtils::Embed by installing the perl distribution instead of the ExtUtils-Embed distribution. Why? I'm not sure. Maybe because it's newer (1.32 instead of 1.2505).

cpanm is wisely unwilling to upgrade perl itself.

Now, the latest App::Packer::PAR's META doesn't specify a minimum version of ExtUtils::Embed, so the version in the ExtUtils-Embed distribution could very well be good enough. The following command will achieve this:

cpanm D/DO/DOUGM/ExtUtils-Embed-1.14.tar.gz

HOWEVER, as I mentioned earlier, ExtUtils::Embed comes with Perl. It has done so for over 15 years (since before Perl 5.4). It makes no sense that you have to install it.

You appear to be using a system whose provider decided to cause headaches by breaking the perl distribution into multiple packages. You should use your system's package manager (apt-get, yum or whatever) to install the missing portions of perl rather than using cpanm.

ikegami
  • 367,544
  • 15
  • 269
  • 518
  • 2
    Perfect! All I had to do was `yum install "perl(ExtUtils::Embed)"` and then cpanm worked as expected. Thanks! – bsmedley Aug 26 '15 at 22:50
  • Thanks. I had the same problem, although with `perl(LWP::UserAgent)` and `perl(HTTP::Response)` instead. Now, *why* these are Yum's concern is a mystery to me. Shouldn't the installation of Perl modules be left to Perl's package manager, not the Linux distribution's? – mamacdon Apr 16 '20 at 12:51
  • @mamacdon Your question makes no sense. The OP was trying to use Perl's package manager but couldn't because their linux distro only contained a partial installation of Perl, and some of the missing parts agree required by the package manager. This obviously can't be fixed by Perl's package manager; this can only be fixed by installing the rest of Perl. The linux distro provides the missing files as one of the packages in their package manager. – ikegami Apr 16 '20 at 13:22
  • @mamacdon If they had been using a proper installation of Perl (as opposed to one lobotomized by their linux distro), they could have used Perl's package manager without problem. – ikegami Apr 16 '20 at 13:25
  • It wasn't a question, but rather a comment. Having the distro assume responsibility for certain Perl packages (by shipping a crippled install of Perl), seems crazy to me. I fully agree that CPAN is the best tool for this job, I just wish Red Hat had felt the same way. – mamacdon Apr 16 '20 at 13:49
  • @mamacdon They figure you'll just use their package manager. And it's actually a good idea to use it when you can so stuff doesn't break when you the distro's Perl is updated. That said, you don't need to install any Perl packages to fix the issue; just the rest of Perl. Probably a package called "perl". Note that neither of the modules you mentioned are part of Perl – ikegami Apr 16 '20 at 13:53