popeye
January 13, 2014, 11:15am
1
I have the need to load modules in a local directory. I am a perl new guy. When I test Net::SSH2, I get the following message. I did load the required libssh2.
cpan[2]> test Net::SSH2
Running test for module 'Net::SSH2'
Running make for R/RK/RKITOVER/Net-SSH2-0.53.tar.gz
CPAN.pm: Building R/RK/RKITOVER/Net-SSH2-0.53.tar.gz
Use of uninitialized value in scalar assignment at /home/chrivida/perl5/lib/perl5/CPAN/Distribution.pm line 1868.
Use of uninitialized value in scalar assignment at /home/chrivida/perl5/lib/perl5/CPAN/Distribution.pm line 1869.
Use of uninitialized value in scalar assignment at /home/chrivida/perl5/lib/perl5/CPAN/Distribution.pm line 1879.
Use of uninitialized value in scalar assignment at /home/chrivida/perl5/lib/perl5/CPAN/Distribution.pm line 1880.
Subroutine checklibs redefined at inc/Module/Install/CheckLib.pm line 11.
Subroutine assertlibs redefined at inc/Module/Install/CheckLib.pm line 25.
Subroutine _author_side redefined at inc/Module/Install/CheckLib.pm line 39.
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 OpenSSL: The Open Source toolkit for SSL/TLS , or libgcrypt, which can be obtained
from The GNU Privacy Guard .
Debian: sudo aptitude install libssh2-1-dev
OpenSUSE: sudo zypper in libssh2-1 libssh2-devel
You can pass your libssh2 lib and include dirs (and extra link args) on the
command line. E.g.:
perl Makefile.PL lib=$HOME/libssh2/lib inc=$HOME/libssh2/include \
ldargs="-lz"
These can also be set through the LIBSSH2_LIB/LIBSSH2_INCLUDE/LIBSSH2_LDARGS
environment variables.
To build with libgcrypt instead of OpenSSL, pass 'gcrypt' as a parameter to
Makefile.PL, e.g.:
perl Makefile.PL gcrypt
If you want to build on Windows, see the file BUILDING.WIN32 in the
distribution.
Can't link/include C library 'libssh2.h', 'ssh2', aborting.
No 'Makefile' createdCPAN: YAML loaded ok (v0.84)
RKITOVER/Net-SSH2-0.53.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Failed during this command:
RKITOVER/Net-SSH2-0.53.tar.gz : writemakefile NO -- No 'Makefile' created
Not sure where to go from here. Is there a way to test that libssh2 is loaded correctly ?
clx
January 27, 2014, 1:48am
2
So you have libssh2
? where ?
Look at these message carefully
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 OpenSSL: The Open Source toolkit for SSL/TLS , or libgcrypt, which can be obtained from The GNU Privacy Guard .
and
perl Makefile.PL lib=$HOME/libssh2/lib inc=$HOME/libssh2/include \
ldargs="-lz"
Make sure you have all the prerequisites.