CLRCode has asked for the wisdom of the Perl Monks concerning the following question:

Forgive me first off for such a beginner question. I am trying to run a perl script that someone else wrote. He calls out "use Net::SSH::Perl::Subsystem::Client". To my dismay when I run this my IDE can't find this module in my @INC. I tried to install this module using cpanp using the "i module Net::SSH::Perl::Subsystem::Client". This looks good all the way up to the point where it looks to install the Math::GMP module. Where it fails miserably because it can't find the library. So I tried to install that module separately. It still fails and throws this to the log:

[MSG] [Thu Mar 15 21:43:26 2012] Trying to get 'ftp://ftp.cpan.org/pub +/CPAN/authors/id/T/TU/TURNSTEP/Math-GMP-2.06.tar.gz' [MSG] [Thu Mar 15 21:43:36 2012] Using cached file '/Users/Chris/.cpan +plus/authors/id/T/TU/TURNSTEP/CHECKSUMS' on disk; ttl (3600s) is not +exceeded [MSG] [Thu Mar 15 21:43:36 2012] Checksum matches for 'Math-GMP-2.06.t +ar.gz' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/.perlcriticr +c' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/README' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/Changes' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/Makefile.PL' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/GMP.xs' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/t/' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/t/01_gmppm.t +' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/t/99_yaml.t' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/t/00_signatu +re.t' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/t/99_pod.t' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/t/99_spellch +eck.t' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/t/99_perlcri +tic.t' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/INSTALL' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/META.yml' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/lib/' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/lib/Math/' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/lib/Math/GMP +.pm' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/MANIFEST' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/SIGNATURE' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/typemap' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/MANIFEST.SKI +P' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/COPYING.LIB' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math-GMP-2.06/LICENSE' [MSG] [Thu Mar 15 21:43:36 2012] Extracted 'Math::GMP' to '/Users/Chri +s/.cpanplus/5.12.3/build/Math-GMP-2.06' [ERROR] [Thu Mar 15 21:43:36 2012] Could not run '/usr/bin/perl Makefi +le.PL': Checking if your kit is complete... Looks good Note (probably harmless): No library found for -lgmp Writing Makefile for Math::GMP Writing MYMETA.yml and MYMETA.json Removing (Makefile) ========================================================== WARNING! No GMP libraries were detected! Please see the INSTALL file. =========================================================== -- cannot continue [ERROR] [Thu Mar 15 21:43:36 2012] Unable to create a new distribution + object for 'Math::GMP' -- cannot continue

I am almost willing to buy a clue at this point. Any help would greatly be appreciated.

Replies are listed 'Best First'.
Re: Newbie question about Modules
by davido (Cardinal) on Mar 16, 2012 at 03:05 UTC

    The installation error message is helpful.

    Please see the INSTALL file.

    The INSTALL file is part of the distribution for Math::GMP, and can be found here.

    The relevant text is at the top of that file:

    To install this package, you will need a version of the GMP library. You can get it at the homepage of GMP:

    http://www.gmplib.org/

    No need to buy anything. This clue is free, but may be worth exactly that. ;)


    Dave

      Well apparently all I needed to do was restart my Macbook pro. Once rebooted, I reinstalled the GNP and then installed Net::SSH::Perl::Subsystem::Client module. This time it worked and my perl script ran without a hitch. Thanks for the help David.

      Thanks for the Help! CLRCode

      Thanks Davido for the reply. So I downloaded and installed the GMP library. After doing so I tried to install the Math::GMP module again. received the same error. "can't find -lgmp". I am using OS X Lion so I do not know if this changes anything. I have read through the man page on perl. It looks like I am doing all the correct things but still can't get this module to install. I installed the library using the correct procedures and it looked like it installed properly with no errors and it passed all of the "make test" tests. Any suggestions? And thanks again for the help.

      Thanks for the Help! CLRCode