Net::SSH installation problems - how do I force local path?

Discussion in 'Perl Misc' started by Ishmael, Jan 5, 2007.

  1. Ishmael

    Ishmael Guest

    I'm trying to install Net::SSH locally (not as root), but I'm having
    trouble getting Make to recognize the paths to the required (also
    locally installed) packages.

    Here's what I'm doing. First, I create the Makefile.

    perl Makefile.PL PREFIX=/home/kstahl/PERL/Net-SSH-Perl-1.30

    ** Note that I have edited Makefile.PL by adding the following line (in
    the hopes that at least it will find my local version of GMP:

    LIBS => ['-L/home/kstahl/PERL/Math-GMP-2.04/'],

    The messages I then get are not promising. Still, the warnings below I
    think are created by trying to run 'use mypackage' and then capturing
    the error messages, and since 'use' doesn't know about my local
    installation of GMP, the error doesn't mean much.

    ...
    Checking if your kit is complete...
    Looks good
    Warning: prerequisite Digest::SHA1 2.10 not found. We have 2.04.
    Warning: prerequisite Math::GMP 1.04 not found.
    Warning: prerequisite Scalar::Util 0 not found.
    Writing Makefile for Net::SSH::perl

    Now 'make' doesn't give any errors, but 'make test' gives the following
    (excerpt):

    PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"

    "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
    t/01-compile.....dubious

    Test returned status 1 (wstat 256, 0x100)
    DIED. FAILED test 1
    Failed 1/1 tests, 0.00% okay
    t/02-buffer......Can't load

    '/apps/gnu/perl_local/lib/site_perl/5.6.1/sol2.sun4/auto/Math/GMP/GMP.so'
    for
    module Math::GMP: ld.so.1: /usr/local/bin/perl: fatal: libgmp.so.3:
    open failed:
    No such file or directory at
    /apps/gnu/perl-5.6.1/lib/sol2.sun4/DynaLoader.pm
    line 206.
    at t/02-buffer.t line 9
    Compilation failed in require at t/02-buffer.t line 9.
    BEGIN failed--compilation aborted at t/02-buffer.t line 9.
    ...

    As I read it, the compiler is looking for GMP.so in the Perl
    installation directory, but that's not where it is - it's in my local
    directory. How can I force the compiler to look in the right place?
    Thanks a million for your help.
     
    Ishmael, Jan 5, 2007
    #1
    1. Advertising

  2. Ishmael

    Sisyphus Guest

    "Ishmael" <> wrote in message
    ..
    ..
    >
    > As I read it, the compiler is looking for GMP.so in the Perl
    > installation directory, but that's not where it is - it's in my local
    > directory. How can I force the compiler to look in the right place?
    > Thanks a million for your help.
    >


    See Sherm Pendley's post in the thread "Math::GMP make test fails" (posted
    yesterday).

    Cheers,
    Rob
     
    Sisyphus, Jan 6, 2007
    #2
    1. Advertising

  3. Ishmael

    Ishmael Guest

    Sisyphus wrote:
    > "Ishmael" <> wrote in message
    > .
    > .
    > >
    > > As I read it, the compiler is looking for GMP.so in the Perl
    > > installation directory, but that's not where it is - it's in my local
    > > directory. How can I force the compiler to look in the right place?
    > > Thanks a million for your help.
    > >

    >
    > See Sherm Pendley's post in the thread "Math::GMP make test fails" (posted
    > yesterday).
    >
    > Cheers,
    > Rob


    Well, actually this is the same person that posted the previous thread.
    Sherm's reply was very helpful, but I'm afraid it doesn't apply in
    this case. His reply is where I got the idea of putting a 'LIBS =>
    ....' line in my Makefile.PL. Alas, it doesn't do the trick this time
    around. Somehow, 'make test' is bypassing my explicit path definition.
    Any ideas?
     
    Ishmael, Jan 6, 2007
    #3
  4. Ishmael

    Sisyphus Guest

    "Ishmael" <> wrote in message
    news:...
    ..
    ..
    > >
    > > See Sherm Pendley's post in the thread "Math::GMP make test fails"

    (posted
    > > yesterday).
    > >

    ..
    ..
    >
    > Well, actually this is the same person that posted the previous thread.


    Heh ... so it is :)

    > Sherm's reply was very helpful, but I'm afraid it doesn't apply in
    > this case. His reply is where I got the idea of putting a 'LIBS =>
    > ...' line in my Makefile.PL. Alas, it doesn't do the trick this time
    > around. Somehow, 'make test' is bypassing my explicit path definition.
    > Any ideas?
    >


    When I go back to your original post in this thread, first thing I notice
    is:

    > Warning: prerequisite Math::GMP 1.04 not found.


    How does that happen ? You've successfully built Math::GMP (according to the
    other thread).

    I think it's a good idea to fix that problem first.

    What does 'perl -MMath::GMP -e 'print "ok\n"' produce ?

    Cheers,
    Rob
     
    Sisyphus, Jan 6, 2007
    #4
  5. Ishmael

    Ishmael Guest


    > When I go back to your original post in this thread, first thing I notice
    > is:
    >
    > > Warning: prerequisite Math::GMP 1.04 not found.

    >
    > How does that happen ? You've successfully built Math::GMP (according to the
    > other thread).
    >
    > I think it's a good idea to fix that problem first.
    >
    > What does 'perl -MMath::GMP -e 'print "ok\n"' produce ?


    Same problem - it's looking in the wrong directory. Here's the error
    message:

    Can't load

    '/apps/gnu/perl_local/lib/site_perl/5.6.1/sol2.sun4/auto/Math/GMP/GMP.so'
    for
    module Math::GMP: ld.so.1: perl: fatal: libgmp.so.3: open failed: No
    such file
    or directory at /apps/gnu/perl-5.6.1/lib/sol2.sun4/DynaLoader.pm
    line 206.
    at -e line 0
    Compilation failed in require.
    BEGIN failed--compilation aborted.

    Now, the only way I know of setting the Perl search path is to use the
    PERL5LIB variable, which I've set as shown below.

    echo $PERL5LIB

    /home/kstahl/PERL/Digest-1.15:/home/kstahl/PERL/Digest-SHA1-2.11:/home/kstahl/PE

    RL/gmp-4.2.1:/home/kstahl/PERL/Math-GMP-2.04:/home/kstahl/PERL/Scalar-List-Utils
    -1.19:/home/kstahl/PERL/Net-SSH-Perl-1.30

    As you can see, the path to the correct version of GMP is right there.
    Is there something else I should be doing?
     
    Ishmael, Jan 6, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. loial
    Replies:
    0
    Views:
    423
    loial
    Feb 3, 2009
  2. Shawn Jan

    Net::SSH Force tty

    Shawn Jan, Jun 20, 2008, in forum: Ruby
    Replies:
    3
    Views:
    138
    Chris Andrews
    Jun 20, 2008
  3. Tench Johnson
    Replies:
    1
    Views:
    313
    Biff Tannen
    Apr 23, 2010
  4. salamond

    net/ssh in ruby. ssh.exec fails

    salamond, Feb 17, 2011, in forum: Ruby
    Replies:
    0
    Views:
    265
    salamond
    Feb 17, 2011
  5. Replies:
    0
    Views:
    125
Loading...

Share This Page