help needed, Can't locate loadable object for module GMP--AIX

S

Senthilkumar T

Hi there,

I need your precious help in solving this error.

I call perl NET::SSH::perl to login a remote server—AIX MACHINE.
***********code*********
#!/usr/bin/perl
use Net::SSH::perl;

$host="wst32";
$user="training";
$pass="welcome";

my $ssh = Net::SSH::perl->new($host);
$ssh->login($user, $pass);
my($stdout, $stderr, $exit) = $ssh->cmd ($cmd);
*******************************

while running the code the error I get is:

Can't locate loadable object for module Math::GMP in @INC (@INC
contains:
/mksysb/ssh/Math-GMP-2.03/lib /usr/opt/perl5/lib/5.6.0/aix
/usr/opt/perl5/lib/5.6.0 /usr/opt/perl5/lib/site_perl/5.6.0/aix
/usr/opt/perl5/lib/site_perl/5.6.0 /usr/opt/perl5/lib/site_perl .)
at /usr/opt/perl5/lib/site_perl/5.6.0/Net/SSH/Perl/Util/SSH1MP.pm line
7

Compilation failed in require at
/usr/opt/perl5/lib/site_perl/5.6.0/Net/SSH/Perl/Util/SSH1MP.pm line 7,
<GEN0> line 1.
BEGIN failed--compilation aborted at
/usr/opt/perl5/lib/site_perl/5.6.0/Net/SSH/Perl/Util/SSH1MP.pm line 7,
<GEN0> line 1.
Compilation failed in require at
/usr/opt/perl5/lib/site_perl/5.6.0/Net/SSH/Perl/Util.pm line 56,
<GEN0> line 1.
BEGIN failed--compilation aborted at
/usr/opt/perl5/lib/site_perl/5.6.0/Net/SSH/Perl/Key/RSA1.pm line 6,
<GEN0> line 1.
Compilation failed in require at
/usr/opt/perl5/lib/site_perl/5.6.0/Net/SSH/Perl/SSH1.pm line 13,
<GEN0> line 1.
BEGIN failed--compilation aborted at
/usr/opt/perl5/lib/site_perl/5.6.0/Net/SSH/Perl/SSH1.pm line 13,
<GEN0> line 1.
Compilation failed in require at
/usr/opt/perl5/lib/site_perl/5.6.0/Net/SSH/Perl.pm line 51, <GEN0>
line 1.
***************
But
Gmp.pm is in path "/mksysb/ssh/Math-GMP-2.03/lib/Math/"
 
S

Sherm Pendley

Senthilkumar said:
while running the code the error I get is:

Can't locate loadable object for module Math::GMP in @INC (@INC
***************
But
Gmp.pm is in path "/mksysb/ssh/Math-GMP-2.03/lib/Math/"

Math::GMP is an XS module - it has both Perl and compiled C code. The error
above is not complaining about the Perl that it found in GMP.pm, it's
complaining that it can't find the corresponding compiled C.

It looks like Math::GMP is improperly installed. (Just a guess, but perhaps
whoever installed Math::GMP simply copied the .pm file into place, instead
of following the instructions found in 'perldoc perlmodinstall'.)

Installing Math::GMP correctly should fix the problem.

sherm--
 
J

Jonathan Stowe

Senthilkumar T said:
I call perl NET::SSH::perl to login a remote server?AIX MACHINE.
***********code*********
#!/usr/bin/perl
use Net::SSH::perl;

Can't locate loadable object for module Math::GMP in @INC (@INC
contains:
/mksysb/ssh/Math-GMP-2.03/lib /usr/opt/perl5/lib/5.6.0/aix
/usr/opt/perl5/lib/5.6.0 /usr/opt/perl5/lib/site_perl/5.6.0/aix
/usr/opt/perl5/lib/site_perl/5.6.0 /usr/opt/perl5/lib/site_perl .)
at /usr/opt/perl5/lib/site_perl/5.6.0/Net/SSH/Perl/Util/SSH1MP.pm line
7

Gmp.pm is in path "/mksysb/ssh/Math-GMP-2.03/lib/Math/"

But the GMP.so (or whatever would be the appropriate extension for a
dynamic library on your machine) isn't. Did you install the module
correctly or did you (as it appears) just add the lib subdirectory of
the place you unpacked the module to @INC? Math::GMP has an XS
component and needs to be built correctly for it to work. If you cannot
install the module into the default location for modules you should
specify PREFIX when running Makefile.PL and then 'use lib' to add this
location to your @INC - this is all described in the section entitled:

How do I keep my own module/library directory?

in perlfaq8

/J\
 
S

Senthilkumar T

Jonathan Stowe said:
But the GMP.so (or whatever would be the appropriate extension for a
dynamic library on your machine) isn't. Did you install the module
correctly or did you (as it appears) just add the lib subdirectory of
the place you unpacked the module to @INC? Math::GMP has an XS
component and needs to be built correctly for it to work. If you cannot
install the module into the default location for modules you should
specify PREFIX when running Makefile.PL and then 'use lib' to add this
location to your @INC - this is all described in the section entitled:

How do I keep my own module/library directory?

in perlfaq8

/J\

hi,
thanks for the comments. Yes we didn't install it properly. But we
are trying to install. I am unable to install it successfully. Which
version of GMP is stable?
 
S

Sherm Pendley

Senthilkumar said:
are trying to install. I am unable to install it successfully. Which
version of GMP is stable?

The latest version should be the one you want. What makes you believe that
it's unstable?

Post the complete set of commands you are using, and their output, to
comp.lang.perl.modules, and ask there for advice. Just reply to this
message, followups are set accordingly.

sherm--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,930
Messages
2,570,072
Members
46,521
Latest member
JamieCooch

Latest Threads

Top