Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Another ssh2 install problem

by rgebbie (Initiate)
on Dec 20, 2012 at 00:34 UTC ( #1009667=perlquestion: print w/replies, xml ) Need Help??
rgebbie has asked for the wisdom of the Perl Monks concerning the following question:

I have seen a lot of postings about problems installing Net::SSH2, but none seem to cover my issue. I have verified that I have dealt with all the dependencies, like libssh2, OpenSSL, etc. I have seen the lib and inc flags to use on the perl Makefile.PL command line. That is where I run into problems. (This is on Linux)

If I specify lib=/usr/local/lib (where libssh2 is), then run make, I get:

Running Mkbootstrap for Net::SSH2 () chmod 644 rm -f blib/arch/auto/Net/SSH2/ LD_RUN_PATH="/usr/local/lib:/usr/lib64:/lib64" gcc -shared -O2 -g -pi +pe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --par +am=ssp-buffer-size=4 -m64 -mtune=generic SSH2.o -o blib/arch/auto/Ne +t/SSH2/ \ -L/usr/local/lib -lssh2 -lz -lssl -lcrypto \ /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status make: *** [blib/arch/auto/Net/SSH2/] Error
Do I need to have some kind if library path set?

Replies are listed 'Best First'.
Re: Another ssh2 install problem
by perl514 (Pilgrim) on Dec 20, 2012 at 03:21 UTC


    Its not a direct answer of your question, but may help....

    I too got a lot of issues while installing Net::SSH2. So I tried searching for it in Package Manager (In Ubuntu, its called Ubuntu Software Center, and in case of CentOS/SL its called Package Manager(I think) ). If using Ubuntu, you can type "Net::SSH2" and it will find it. In CentOS/Scientific Linux, you can type "ssh". Or you can also try typing "Net-SSH2" and that might bring it up in the list. In either cases, it will state that it needs to install some dependencies and take care of the installation.

    Thats how I installed it. Not sure how it works on other Linux flavours, but there's got to be some Package Manager in it.


    Perlpetually Indebted To PerlMonks

    Win 7 at Work. Living through it....Linux at home. Loving it.

Re: Another ssh2 install problem
by salva (Abbot) on Dec 20, 2012 at 08:52 UTC
    For Linux/Unix machines, Net::OpenSSH is probably a better option than Net::SSH2. You can even use Net::OpenSSH::Compat::SSH2, an adapter module providing Net::SSH2 API on top of Net::OpenSSH.
Re: Another ssh2 install problem
by Anonymous Monk on Dec 20, 2012 at 02:16 UTC
Re: Another ssh2 install problem
by zentara (Archbishop) on Dec 20, 2012 at 10:10 UTC
    In case installing your libz-dev package didn't work, you may want to see if you have proper symlinks to it. For instance, if your libz is in /usr/lib, you should have symlinks like this, all pointing to your actual libz version.:

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1009667]
Approved by starX
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2017-08-20 02:40 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (313 votes). Check out past polls.