in reply to SFTP for Perl on CygWin

Since you are working on windows have you considered Strawberry Perl? It ships with a sane development environment and many libraries, including Net::SSH2. Failing that you're going to have to be more specific about how you tried to install these things and what the failures are.

Replies are listed 'Best First'.
Re^2: SFTP for Perl on CygWin
by pryrt (Abbot) on Jul 18, 2018 at 20:15 UTC

    while I second the Strawberry Perl recommendation, cygwin is a reasonably-"sane" development environment (though I haven't actively used it in years), and you should probably just have to install the appropriate development library. A quick search for "cygwin crypt.h" found this cygwin mailing list post, where it says you need to install the libcrypt-devel development library to get the headers/etc, and libcrypt0 for the DLL itself. A package search on cygwin does show those two packages exist.

    So, try to use cygwin's package manager for the libcrypt-devel and libcrypt0, and then see whether you can install the perl modules.

    I thought there might even be a package for properly installing Net::SSH2 and/or Net::SFTP ... but, not that I could find.

      I suggested Strawberry because it already includes all sorts of useful libraries and perl modules, including Net::SSH2. This made working on Windows so much easier for me, and given how easy it is to use I don't see any advantage of using perl via Cygwin. Perhaps someone has a special use case. Net::SFTP is a pure perl implementation.

      Thanks. So I installed the source for libcrypt-devel using the CygWin installer. I then found I had to further install Math::Int64, Net::SSH::perl, and Crypt::PRNG. Once all that was done, I could install Net::SSH2 and then Net::SFTP. Everything seemed to make, make test, and make install successfully with all of that. I run my script, and it still says "Can't locate Net/SFTP.pm in @INC (you may need to install the Net::SFTP module)" This seems strange to me, given that it seems successfully installed Net::SFTP. Any ideas? Thanks again.