Search code examples
perlsshversioningperl-module

Trying to install Net::OpenSSH but getting back invalid version for dependencies


I'm working with some perl 5.8.8 legacy code and I usually check my installed packages with perl -MNet::OpenSSH -e 'print "worked \n"'

If it's absent it states:

Can't locate Net/OpenSSH.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .).
        BEGIN failed--compilation aborted.

Which is normal. Then I run cpanm and it installs. However, with this OpenSSH module I am getting back that some dependencies are not a valid version.

kristen:/web# cpanm Net::OpenSSH
install is up to date. (0.01)
--> Working on Net::OpenSSH
Fetching http://www.cpan.org/authors/id/S/SA/SALVA/Net-OpenSSH-0.62.tar.gz ... OK
Configuring Net-OpenSSH-0.62 ... OK
Failed to clean-up 2 metadata. Errors:
'version=HASH(0x8eb66f4)' for 'Test::More' is not a valid version. (prereqs -> runtime -> requires -> Test::More) [Validation: 2]
'version=HASH(0x8eb6700)' for 'ExtUtils::MakeMaker' is not a valid version. (prereqs -> configure -> requires -> ExtUtils::MakeMaker) [Validation: 2]
'version=HASH(0x8eb69f4)' for 'ExtUtils::MakeMaker' is not a valid version. (prereqs -> build -> requires -> ExtUtils::MakeMaker) [Validation: 2]

I used cpanm upgrade Test::More which didn't resolved the problem for that module so I think I need a lower version number. So how do I check what versions I need to use Net::OpenSSH?


Solution

  • Upgrading cpanm and then installing the module resolved the issue.