Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Need Help Installing Net::SSH2

by Khen1950fx (Canon)
on Aug 29, 2011 at 16:51 UTC ( #923062=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Need Help Installing Net::SSH2
in thread Need Help Installing Net::SSH2

Go into the directory that you untarred the src to and type:

./configure --help
A list of all the different options will popup. I would recommend doing:
./configure --enable-shared --with-gnu-ld
The "--with-gnu-ld" is necessary in order to properly do ldconfig. So the mantra is:
./configure --enable-shared --with-gnu-ld make make check make install /sbin/ldconfig /usr/local/lib
Now run
whereis libssh2
If everything's in order, then it should return something like:
/usr/local/lib/libssh2.so /usr/local/lib/libssh2.a /usr/local/lib/libssh2.la
Update: I think that you have the same problem with OpenSSL. Here's the most recent tarball:

http://www.openssl.org/source/openssl-1.0.0d.tar.gz

It's a slightly more complicated procedure. First, you need to remove the current openssl include headers. Then do
./Configure linux-elf -march=pentium make make test make install
Next, you must manually install Net::SSH2.
export LD_LIBRARY_PATH=/usr/local/lib perl Makefile.PL lib=/usr/local/lib make make test make install
Now, you're good to go...


Comment on Re^3: Need Help Installing Net::SSH2
Select or Download Code
Re^4: Need Help Installing Net::SSH2
by DanielSpaniel (Scribe) on Aug 29, 2011 at 21:03 UTC
    Hi Khen1950fx,

    Sorry, only just saw your reply. Okay, I will give this a whirl. Without reading your entire post I dived straight in and tried the ./configure bit (and got the "configure: error: Cannot find OpenSSL's <evp.h> or <hmac.h>") ... Then I saw your comment further down about downloading and installing OpenSSL again ... so I'm trying that now. Download seems to have messed up at the moment, so I'll try again in a while ... Meantime I am trying to locate the current openssl include headers, which currently escape me.

    Thank you again for your help, and if I don't get back here tonight, then I hope I can bother you again tomorrow if you're able to. Thanks!

Re^4: Need Help Installing Net::SSH2
by DanielSpaniel (Scribe) on Sep 04, 2011 at 19:20 UTC

    Hi Khen1950x, Finally got back onto this project again for a while ... You said that I should "... First, you need to remove the current openssl include headers." However, I am a bit lost as to know where to locate them, in order to remove them. I guess it may be different on different systems, but if you're able to make some suggestions then that would be very useful to me. Meantime, I have now downloaded both the libssh2 and openssl tarballs and extracted. I tried doing the libssh2 stuff you suggested, before having done anything else, and it errored with:

    "checking for OpenSSL... configure: error: Cannot find OpenSSL's <evp.h> or <hmac.h>"

    So, I figured I needed to do the openssl stuff first. But, before doing that I wanted to make sure that I had removed the files you suggested ... and that's where I am right now. Any assistance mightily appreciated. I think this might take me a while to do, since I'm on a bit of a learning curve here, but hope you can be patient :-) Thanks again.

      Don't worry about the headers. Just follow the procedures that I gave you in this order:

      1st) OpenSSL
      2nd) libssh2
      3rd) Net::SSH2

      You can usually find the headers in /usr/local/include or do locate evp.h and so on. Have fun...

        Thanks for the info ... However, I don't seem to be progressing very far. I tried installing the OpenSSL the way you suggested and got errors (as in first code-box below). Then, noting it seemed to be with regards to 64-bit stuff (which the machine is) I used a different "march" value, as in the second box below (which resulted in different errors).

        # ./Configure linux-elf -march=pentium # make making all in crypto... make[1]: Entering directory `/home/xyz/Downloads/ssltest/openssl-1.0.0 +d/crypto' ( echo "#ifndef MK1MF_BUILD"; \ echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */' +; \ echo ' #define CFLAGS "gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN + -DHAVE_DLFCN_H -march=pentium -DL_ENDIAN -DTERMIO -O3 -fomit-frame-p +ointer -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSS +L_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160 +_ASM -DAES_ASM -DWHIRLPOOL_ASM"'; \ echo ' #define PLATFORM "linux-elf"'; \ echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \ echo '#endif' ) >buildinf.h gcc -I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN +-DHAVE_DLFCN_H -march=pentium -DL_ENDIAN -DTERMIO -O3 -fomit-frame-po +inter -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL +_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ +ASM -DAES_ASM -DWHIRLPOOL_ASM -c -o cryptlib.o cryptlib.c cryptlib.c:1:0: error: CPU you selected does not support x86-64 instru +ction set cryptlib.c:1:0: error: CPU you selected does not support x86-64 instru +ction set make[1]: *** [cryptlib.o] Error 1 make[1]: Leaving directory `/home/xyz/Downloads/ssltest/openssl-1.0.0d +/crypto' make: *** [build_crypto] Error 1

        -----------------------------------------------------

        # ./Configure linux-elf -march=x86-64 # make making all in crypto... make[1]: Entering directory `/home/xyz/Downloads/ssltest/openssl-1.0.0 +d/crypto' gcc -I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN +-DHAVE_DLFCN_H -march=x86-64 -DL_ENDIAN -DTERMIO -O3 -fomit-frame-poi +nter -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_ +BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_A +SM -DAES_ASM -DWHIRLPOOL_ASM -c -o x86cpuid.o x86cpuid.s x86cpuid.s: Assembler messages: x86cpuid.s:8: Error: invalid instruction suffix for `push' x86cpuid.s:9: Error: invalid instruction suffix for `push' x86cpuid.s:10: Error: invalid instruction suffix for `push' x86cpuid.s:11: Error: invalid instruction suffix for `push' x86cpuid.s:13: Error: invalid instruction suffix for `pushf' x86cpuid.s:14: Error: invalid instruction suffix for `pop' x86cpuid.s:17: Error: invalid instruction suffix for `push' x86cpuid.s:18: Error: invalid instruction suffix for `popf' x86cpuid.s:19: Error: invalid instruction suffix for `pushf' x86cpuid.s:20: Error: invalid instruction suffix for `pop' x86cpuid.s:99: Error: invalid instruction suffix for `pop' x86cpuid.s:100: Error: invalid instruction suffix for `pop' x86cpuid.s:101: Error: invalid instruction suffix for `pop' x86cpuid.s:102: Error: invalid instruction suffix for `pop' x86cpuid.s:130: Error: invalid instruction suffix for `pushf' x86cpuid.s:131: Error: invalid instruction suffix for `pop' x86cpuid.s:135: Error: invalid instruction suffix for `push' x86cpuid.s:136: Error: invalid instruction suffix for `push' x86cpuid.s:153: Error: invalid instruction suffix for `pushf' x86cpuid.s:154: Error: invalid instruction suffix for `pop' x86cpuid.s:209: Error: invalid instruction suffix for `push' x86cpuid.s:218: Error: invalid instruction suffix for `pop' x86cpuid.s:226: Error: invalid instruction suffix for `push' x86cpuid.s:245: Error: invalid instruction suffix for `pop' make[1]: *** [x86cpuid.o] Error 1 make[1]: Leaving directory `/home/xyz/Downloads/ssltest/openssl-1.0.0d +/crypto' make: *** [build_crypto] Error 1

        Any suggestions? I feel very incompetent at doing this :-(

Re^4: Need Help Installing Net::SSH2
by Anonymous Monk on Apr 30, 2014 at 19:23 UTC
    cd /root/.cpan/build/Net-SSH2-0.53-AjnE2p/ export LD_LIBRARY_PATH=/usr/local/lib/ perl Makefile.PL lib=/usr/local/lib make make install perl -MCPAN -e shell cpan[1]> install Net::SSH2 Reading '/root/.cpan/Metadata' Database was generated on Wed, 30 Apr 2014 10:53:02 GMT Net::SSH2 is up to date (0.53).
    Thanks - this worked

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://923062]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2014-07-23 08:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (136 votes), past polls