bsmedley
bsmedley

Reputation: 53

Why won't cpanm install dependencies?

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?

Upvotes: 5

Views: 4696

Answers (1)

ikegami
ikegami

Reputation: 385789

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.

Upvotes: 6

Related Questions