Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/ line 6

This is the script:

use Net::SSH::Perl;
my $host = '';
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
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

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

Your Answer


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.