Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using perl SSH module from CPAN. After executing the script, I get this error

Math::BigInt: couldn't load specified math lib(s), 
fallback to Math::BigInt::Calc 
at /usr/local/lib/perl5/site_perl/5.14.2/Crypt/DH.pm line 6

This is the script:

!/usr/bin/perl
use Net::SSH::Perl;
my $host = 'mymachine.com';
my $user = 'xyz';
my $pass = 'xyx';

my $ssh = Net::SSH::Perl->new($host);
    $ssh->login($user, $pass);
    my($stdout, $stderr, $exit) = $ssh->cmd($cmd);
share|improve this question
1  
what is error ? –  geoh Apr 29 '12 at 15:36
    
Does the script above really start with '!' or did you leave out the '#' that should precede it by accident? –  arielf Mar 12 '13 at 3:12
add comment

1 Answer

It probably means you are missing perl modules.

Crypt::DH wants either Math::BigInt or Math::BigInt::GMP or Math::BigInt::Pari. Try to install these and watch out for warnings.

(cpan> install Math::BigInt, cpan> install Math::Pari, cpan> install Math::PMG)

If you get a

WARNING! No GMP libraries were detected!

then you might be missing header files for libgmp (the development package for libgmp).

share|improve this answer
    
Or even better, rather than installing modules via CPAN, use the standard ubuntu packages. This would have avoided the problem in the 1st place by automatically installing all the necessary prerequisites. apt-get install libnet-ssh-perl libcrypt-openssl-bignum-perl ... etc. –  arielf Mar 12 '13 at 3:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.