miyagawa / Carmel

CPAN Artifact Repository Manager
Other
138 stars 17 forks source link

Issue with Net::DNS and Getopt::Long #82

Closed miyagawa closed 2 years ago

miyagawa commented 2 years ago
➜  cat cpanfile 
requires 'Net::DNS';

➜  carmel
---> Installing modules...
---> Installing new dependencies: Net::DNS    
! Installing the dependencies failed: Installed version (2.39) of Getopt::Long is not in range '2.43'
! Bailing out the installation for Net-DNS-1.33.
! Installing the dependencies failed: Module 'Net::DNS' is not installed
! Bailing out the installation for ..
Can't find an artifact for Net::DNS => 1.33
You need to run `carmel install` first to get the modules installed and artifacts built.

There actually seems to be a problem using cpanm as well, with -L:

➜  cpanm -L /tmp/lib Net::DNS
! Installing the dependencies failed: Installed version (2.39) of Getopt::Long is not in range '2.43'
! Bailing out the installation for Net-DNS-1.33.
miyagawa commented 2 years ago

Looks like I have an outdated version of Getopt::Long in perl library path. Getopt::Long changed its INSTALLDIRS correctly to site in 2.41. I don't recall how this was installed but explicitly installing 2.39 would do this.

➜  perl -v |head -2

This is perl 5, version 32, subversion 1 (v5.32.1) built for darwin-2level

➜  perl -MGetopt::Long\ 11
Getopt::Long version 11 required--this is only version 2.39 at /Users/miyagawa/.plenv/versions/5.32.1/lib/perl5/5.32.1/Getopt/Long.pm line 1489.
BEGIN failed--compilation aborted.

➜  corelist -a Getopt::Long | grep 5.32.1
  v5.32.1    2.51    

Restoring 2.51 has fixed the issue.