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 SSH2.bs rm -f blib/arch/auto/Net/SSH2/SSH2.so 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/SSH2.so \ -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/SSH2.so] Error
Do I need to have some kind if library path set?


In reply to Another ssh2 install problem by rgebbie

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.