• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1654
  • Last Modified:

I get Can't locate loadble object for module Math::GMP

Hello:

When I attempt o utilize the Net::SSH::Perl module in a script I get the following error message:

C:\dev\Jobs\Perl\WIN32>perl ls_ssh_win32.pl
Can't locate loadable object for module Math::GMP in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/sit
e/lib/Net/SSH/Perl/Util/SSH1MP.pm line 7
Compilation failed in require at C:/Perl/site/lib/Net/SSH/Perl/Util/SSH1MP.pm line 7.
BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/SSH/Perl/Util/SSH1MP.pm line 7.
Compilation failed in require at C:/Perl/site/lib/Net/SSH/Perl/Util.pm line 56.
BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/SSH/Perl/Key/RSA1.pm line 6.
Compilation failed in require at C:/Perl/site/lib/Net/SSH/Perl/SSH1.pm line 13.
BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/SSH/Perl/SSH1.pm line 13.
Compilation failed in require at C:/Perl/site/lib/Net/SSH/Perl.pm line 55.

My programming since tells me I'm missing some loadable object. But I did find a gmp.dll and placed it in my system32 directroy, but I still get the error can you help?
0
brob06
Asked:
brob06
1 Solution
 
Adam314Commented:
It looks like the Net::SSH::Perl module requires the Math::GMP module.  How did you install the Net::SSH::Perl module?
0
 
Adam314Commented:
You could install the math::GMP module.  Download it from here:
http://search.cpan.org/CPAN/authors/id/C/CH/CHIPT/Math-GMP-2.04.tar.gz

There are installation instructions included.
0
 
brob06Author Commented:
Sorry, for the delay this is my first experience with Expert Exchange and I wasn't sure, if I got immediate responses or not. But I do have the Math::GMP module installed. If you look closely at the error ti doesn't say that it can locate the MATH::GMP file for example, if I did something like:

If I create a perl script with the only thing in it is the following "use" statement:

use Math::NOTAREALMODULE;

Let's say the script is name perl_test_use_Math_GMP.pl

What I get is this error:
C:\dev\Jobs\Perl\WIN32>perl test_use_Math_GMP.pl
Can't locate Math/NOTAREALMODULE.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at test_use_Math_GMP.pl line
 1.
BEGIN failed--compilation aborted at test_use_Math_GMP.pl line 1.

But if I change that "user" statement to:
use Math::GMP;

What I get is this error:
C:\dev\Jobs\Perl\WIN32>perl test_use_Math_GMP.pl
Can't locate loadable object for module Math::GMP in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at test_use_
th_GMP.pl line 1
Compilation failed in require at test_use_Math_GMP.pl line 1.
BEGIN failed--compilation aborted at test_use_Math_GMP.pl line 1.

You see the first error is showing the path "Can't locate Math/NOTAREALMODULE.pm"
The second error is saying it can not load the object for the Module  "Can't locate loadable object for module Math::GMP"

So, my assumption is that it's not that it's not finding GMP.pm it seems to be having some problem loading some associated object file. By the way I'm on windows XP
 
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
FishMongerCommented:
If you use cpan to install/reinstall the module, it will tell you of any missing dependencies and allow you to install them as well.  First, you'll need to download nmake.exe then run the span shell.  The first time you run the shell it walk you through its configuration; one of the steps is to tell it where it can find you c compiler (nmake.exe).

http://johnbokma.com/perl/make-for-windows.html
http://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe

http://cpan.org/misc/cpan-faq.html#How_install_Perl_modules

Start the cpan shell:
perl -MCPAN -e shell


0
 
brob06Author Commented:
I've done that previously, but I've done it again and here's what I'm getting:

cpan> install Math::GMP
CPAN: Storable loaded ok
Going to read C:\Perl\Metadata
  Database was generated on Mon, 10 Apr 2006 18:46:07 GMT
Math::GMP is up to date.

I still get the following error when I run my simple perl script that has the one liner in it "use Math::GPM"
C:\dev\Jobs\Perl\WIN32>perl -wc test_use_Math_GMP.pl
Can't locate loadable object for module Math::GMP in @INC (@INC contains: C:/Perl/lib C:/Perl/site/l
th_GMP.pl line 1
Compilation failed in require at test_use_Math_GMP.pl line 1.
BEGIN failed--compilation aborted at test_use_Math_GMP.pl line 1.

I also did the force install Math::GMP thing and I get the following error:
...
GMP.xs(4) : fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
  C:\Program Files\Microsoft Visual Studio\VC98\bin\nmake.EXE  -- NOT OK
Running make test
  Can't test without successful make
Running make install
  make had returned bad status, install seems impossible
...
0
 
brob06Author Commented:
I found a workable solution to my own problem.

It appears that many of the installs for Math::GMP are not for windows. I was never really able to find a cpan -e ''Install Math:GMP" solution that worked with windows. It seemed to always automatically grab tarballs designed for use on a unix host.

I did fortunately find a site that had .PPD files for both 5.6 and 5.8 for windows. And this worked.
So, all I had to do with to follow this link and then follow the instructions in the readme file for my version of perl, which can be figured out by doing perl -version.

Once you've got the version get the appropriate .PPD from:

http://www.kalinabears.com.au/w32perl/math_gmp.html

It WORKS!!! :-)
0
 
brob06Author Commented:
Now how do I close this question?????
0
 
Adam314Commented:
post a comment in community support stating that you found the solution to your question on your own, and you want to PAQ this question and have your points refunded.
0
 
DarthModCommented:
PAQed with points refunded (500)

DarthMod
Community Support Moderator
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now