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

I've been trying to install Net::SSH2 for 2 days without success.

I'm using Win XP and Perl 5.8(Strawberry). I tried 5.10 but then I read somewhere on this site that there might be a compatibility issue w/Net::SSH2 & 5.10 so I uninstalled 5.10 and installed 5.8.

This was the error when using CPAN, CPANP or a manual ‘perl make.pl’:

“The libssh2 library is required by this module. If you don't have it +, you can download it from http://www.libssh2.org; you may also need +OpenSSL, which can be obtained from http://www.openssl.org. Debian: sudo aptitude install libssh2-1-dev OpenSUSE: sudo zypper in libssh2-1 libssh2-devel Can't link/include ‘libssh2.h’, 'ssh2'

But then I copied \libssh2-0.12\include\libssh2.h to C:\strawberry\c\include and now I get the same error except the last line is:

Can't link/include 'ssh2'

I've read this post: http://www.perlmonks.org/?node_id=581715, but the command in the post doesn’t work on WinXP. Here's an excerpt from the 'INSTALL' file in the libssh2-0.12 folder:

! * Run: ./configure (passing additional options as desired) In addition the the standard set of ./configure options (e.g. --pr +efix) ! * --with-openssl=[DIR] ! ./configure will attempt to locate OpenSSL in a number of defa +ult locations: /usr/local/ssl /usr/local /usr /usr/local/openssl !

The “INSTALL” file included with libssh2 doesn’t apply to WinXP . . .

Also, I'm not familiar with any of the file extensions in the libssh2-0.12\win32 folder: ".mk, .dsp, .dsw, & .h". Are these extensions for WinXP?

Any help is greatly appreciated!!

Comment on Can't install Net::SSH2 on win32 (libssh2, openssl)
Select or Download Code
Re: Can't install Net::SSH2 on win32 (libssh2, openssl)
by syphilis (Canon) on Dec 26, 2009 at 22:27 UTC
    I think the 5.10 issues are now resolved.
    If ppm install http://theoryx5.uwinnipeg.ca/ppms/Net-SSH2.ppd will work for you, that would be the easiest way to get it. It's Net-SSH2-0.28 built against a static libssh2-1.2.1, so there's nothing else needed.

    See how you go with that. (A slightly different ppm command will be needed if you switch back to 5.10.)

    Cheers,
    Rob

      Dude!!!!

      YOU ROCK!

      I'm on my other pc that still has 5.10 so I figured out the differences in the URLs (I'm posting it for other noobs),

      URL for 5.8:

      http://theoryx5.uwinnipeg.ca/ppms/

      URL for 5.10:

      http://cpan.uwinnipeg.ca/PPMPackages/10xx

      and BAM, the module installed in a minute:

      C:\libssh2-0.12\win32>ppm install http://cpan.uwinnipeg.ca/PPMPackages +/10xx/Net-SSH2.ppd Downloading Net-SSH2-0.28...done Unpacking Net-SSH2-0.28...done Generating HTML for Net-SSH2-0.28...done Updating files in site area...done 17 files installed

      Just as to not confuse anybody, I just happened to be in the "C:\libssh2-0.12\win32>" directory. Correct me if I'm wrong, but the install command you posted would have worked from any directory.

      Thanks a million!

Try Cygwin ... Re: Can't install Net::SSH2 on win32 (libssh2, openssl)
by clp (Friar) on Dec 27, 2009 at 00:22 UTC

      I'm gonna try cygwin. Did you know they just came out with a new release?

      Would you recommend sticking with 1.5 or going for 1.7?

        Play with the Cygwin install tool to understand how it works (the UI confused me initially). I would start with the older release, and read the release notes for it and for the newer software, to have some idea of what bugs were found & fixed or not (especially any compatibility issues with the Windows o/s you are using).

        After you have a working system, and have read some docs & used it a while and made some mistakes, you'll be in a better position to know if you want to, or must, upgrade to a newer release. Most of the pieces I have used have been solid and I have rarely found it necessary to upgrade. Upgrading can be a straightforward process.

        Having real CPAN on a Windows o/s is a great benefit for me, but I am not writing Perl code for deployment on various Win systems. I can install Cygwin on the machines I use. Your environment and requirements might be different.