http://www.perlmonks.org?node_id=1013355

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

Hi, i got a little stucked in installation of the Net:SSH2 module in a Redhat EL6 Distribution. When i start the makefile following result will given:
perl Makefile.PL lib=/usr/local/lib inc=/usr/include 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 li +ne 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, wh +ich can be obtained from http://www.openssl.org. Debian: sudo aptitude install libssh2-1-dev OpenSUSE: sudo zypper in libssh2-1 libssh2-devel You can pass your libssh2 lib and include dirs on the command line. E. +g.: perl Makefile.PL lib=$HOME/libssh2/lib inc=$HOME/libssh2/include If you want to build on Windows, see the file BUILDING.WIN32 in the distribution. Writing Makefile for Net::SSH2 Writing MYMETA.yml and MYMETA.json
or same result
perl Makefile.PL lib=/usr/lib64 inc=/usr/include
The packages needed are installed with yum with following versions:
libssh2: libssh2-1.2.2-11.el6_3.x86_64 openssl: openssl-1.0.0-25.el6_3.1.x86_64 zlib: zlib-1.2.3-27.el6.x86_64
Now i downloaded a tarball and compiled the libssh2 to the first written directories without any changes. (I read this as solution here some time ago posted) I am completely stucked what could be wrong. Can anyone help me to get a clean makefile?

Replies are listed 'Best First'.
Re: net::ssh2 module wont install RHEL6
by aitap (Curate) on Jan 15, 2013 at 11:11 UTC
    In addition to the previous comment, try listing the contents of these packages (rpm -ql <packagename>, if I remember it properly). The -dev packages have files (*.h) in /usr/include/, so other programs can be built and linked against the libraries (which are *.so in /usr/lib/) from the non-development packages.
    Sorry if my advice was wrong.
Re: net::ssh2 module wont install RHEL6
by Anonymous Monk on Jan 15, 2013 at 11:02 UTC

    The packages needed are installed with yum with following versions:

    Hmm, neither of those have dev in the names like Makefile.PL tells you

    Details matter

Re: net::ssh2 module wont install RHEL6
by Anonymous Monk on Jan 15, 2013 at 11:14 UTC
    What happens when you run  make?
      Here the output of the rpm info (I forgot to quote the dev package sorry):
      rpm -ql libssh2-devel /usr/include/libssh2.h /usr/include/libssh2_publickey.h /usr/include/libssh2_sftp.h /usr/lib64/libssh2.so /usr/lib64/pkgconfig/libssh2.pc /usr/share/doc/libssh2-devel-1.2.2 /usr/share/doc/libssh2-devel-1.2.2/COPYING rpm -ql libssh2 /usr/lib64/libssh2.so.1 /usr/lib64/libssh2.so.1.0.1 /usr/share/doc/libssh2-1.2.2 /usr/share/doc/libssh2-1.2.2/AUTHORS /usr/share/doc/libssh2-1.2.2/COPYING /usr/share/doc/libssh2-1.2.2/ChangeLog /usr/share/doc/libssh2-1.2.2/NEWS /usr/share/doc/libssh2-1.2.2/README
      Now i run make / make install with following output:
      make Skip blib/lib/Net/SSH2/File.pm (unchanged) Skip blib/lib/Net/SSH2/PublicKey.pm (unchanged) Skip blib/lib/Net/SSH2/Dir.pm (unchanged) Skip blib/lib/Net/SSH2/SFTP.pm (unchanged) Skip blib/lib/Net/SSH2/Listener.pm (unchanged) Skip blib/lib/Net/SSH2/Channel.pm (unchanged) Skip blib/lib/Net/SSH2.pm (unchanged) cc -c -I/usr/include -I. -fno-strict-aliasing -pipe -fstack-protector + -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 + -DVERSION=\"0.46\" -DXS_VERSION=\"0.46\" -fPIC "-I/usr/bin/perl5.16 +/lib/5.16.2/x86_64-linux/CORE" SSH2.c Running Mkbootstrap for Net::SSH2 () chmod 644 SSH2.bs rm -f blib/arch/auto/Net/SSH2/SSH2.so LD_RUN_PATH="/usr/local/lib:/lib/../lib64:/usr/lib/../lib64" cc -shar +ed -O2 -L/usr/local/lib -fstack-protector SSH2.o -o blib/arch/auto/N +et/SSH2/SSH2.so \ -L/usr/local/lib -lssh2 -lz -lssl -lcrypto \ chmod 755 blib/arch/auto/Net/SSH2/SSH2.so cp SSH2.bs blib/arch/auto/Net/SSH2/SSH2.bs chmod 644 blib/arch/auto/Net/SSH2/SSH2.bs Manifying blib/man3/Net::SSH2::File.3 Manifying blib/man3/Net::SSH2::Dir.3 Manifying blib/man3/Net::SSH2::PublicKey.3 Manifying blib/man3/Net::SSH2::SFTP.3 Manifying blib/man3/Net::SSH2::Listener.3 Manifying blib/man3/Net::SSH2::Channel.3 Manifying blib/man3/Net::SSH2.3 and make install Files found in blib/arch: installing files in blib/lib into architectu +re dependent library tree Installing /usr/bin/perl5.16/lib/site_perl/5.16.2/x86_64-linux/auto/Ne +t/SSH2/SSH2.bs Installing /usr/bin/perl5.16/lib/site_perl/5.16.2/x86_64-linux/auto/Ne +t/SSH2/SSH2.so Installing /usr/bin/perl5.16/lib/site_perl/5.16.2/x86_64-linux/auto/Ne +t/SSH2/autosplit.ix Installing /usr/bin/perl5.16/lib/site_perl/5.16.2/x86_64-linux/Net/SSH +2.pm Installing /usr/bin/perl5.16/lib/site_perl/5.16.2/x86_64-linux/Net/SSH +2/PublicKey.pm Installing /usr/bin/perl5.16/lib/site_perl/5.16.2/x86_64-linux/Net/SSH +2/Dir.pm Installing /usr/bin/perl5.16/lib/site_perl/5.16.2/x86_64-linux/Net/SSH +2/File.pm Installing /usr/bin/perl5.16/lib/site_perl/5.16.2/x86_64-linux/Net/SSH +2/Listener.pm Installing /usr/bin/perl5.16/lib/site_perl/5.16.2/x86_64-linux/Net/SSH +2/Channel.pm Installing /usr/bin/perl5.16/lib/site_perl/5.16.2/x86_64-linux/Net/SSH +2/SFTP.pm Installing /usr/bin/perl5.16/man/man3/Net::SSH2::PublicKey.3 Installing /usr/bin/perl5.16/man/man3/Net::SSH2.3 Installing /usr/bin/perl5.16/man/man3/Net::SSH2::File.3 Installing /usr/bin/perl5.16/man/man3/Net::SSH2::SFTP.3 Installing /usr/bin/perl5.16/man/man3/Net::SSH2::Channel.3 Installing /usr/bin/perl5.16/man/man3/Net::SSH2::Dir.3 Installing /usr/bin/perl5.16/man/man3/Net::SSH2::Listener.3 Appending installation info to /usr/bin/perl5.16/lib/5.16.2/x86_64-lin +ux/perllocal.pod
      When i check now with perldoc perllocal if found following entry:
      Tue Jan 15 12:58:39 2013: "Module" Net::SSH2 · "installed into: /usr/bin/perl5.16/lib/site_perl/5.16.2" · "LINKTYPE: dynamic" · "VERSION: 0.46" · "EXE_FILES: "
      Due there where no error included, could it be that the installation is correct?

        Due there where no error included, could it be that the installation is correct?

        Probably , although you should run  make test before installing ...  cpan Module usually does that