AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  perl cpan install can't find library z

    Posted Tue August 08, 2023 11:06 AM

    Dear team, dear community.

    we were trying to install NET-SSH2 module for perl using cpan and we got following output:

    cpan[1]> install Net::SSH2
    Reading '/root/.cpan/Metadata'
      Database was generated on Tue, 08 Aug 2023 02:54:01 GMT
    Running install for module 'Net::SSH2'
    Checksum for /root/.cpan/sources/authors/id/R/RK/RKITOVER/Net-SSH2-0.73.tar.gz ok
    Scanning cache /root/.cpan/build for sizes
    ............................................................................DONE
    'YAML' not installed, will not store persistent state
    Configuring R/RK/RKITOVER/Net-SSH2-0.73.tar.gz with Makefile.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 , or libgcrypt, which can be obtained
    from http://www.gnupg.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 (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, use the crypto_backend
    option when calling Makefile.PL, e.g.:
    
        perl Makefile.PL crypto_backend=gcrypt
    
    Looking for libraries...
    Analyzing file assertlibntl_xkuW
    Library ssh2 found in standard place
    Detected crypto backend: openssl
    crypto backend set to openssl
    Unable to find a working version of library z in the following directories:
      /opt/freeware/lib
      /usr/lib
      /usr/ccs/lib
      /usr/lib64
      /opt/freeware
      /usr
      /usr/local
      /opt
      /opt/local
      /usr/local/libssh2
      /opt/libssh2
      /usr/local/ssl
      /root
      /root/libssh2
    Warning: No success on command[/opt/freeware/bin/perl Makefile.PL]
      RKITOVER/Net-SSH2-0.73.tar.gz
      /opt/freeware/bin/perl Makefile.PL -- NOT OK
    Failed during this command:
    RKITOVER/Net-SSH2-0.73.tar.gz                : writemakefile NO '/opt/freeware/bin/perl Makefile.PL' returned status 512
    

    Unable to find a working version of library z, even libz is installed as rpm and lpp:

    :/root#rpm -qa | grep libz
    libzstd-1.5.2-2.ppc
    libzstd-devel-1.5.2-2.ppc

    and

    :/root#lslpp -L | grep zlib
      zlib                      1.2.13-1    C     R    The zlib compression and

    and lib file could be found in /opt/freeware/lib

    :/root#ll /opt/freeware/lib/libz*
    -rw-r--r--    1 root     system       699406 Dec  1 2022  /opt/freeware/lib/libz.a
    -rw-r--r--    1 root     system      3030179 Mar 15 16:55 /opt/freeware/lib/libzck.a
    -rwxr-xr-x    1 root     system     84154189 Sep  1 2021  /opt/freeware/lib/libzmq.a
    -rwxr-xr-x    1 root     system     41360692 Sep  1 2021  /opt/freeware/lib/libzmq.so.5
    -rw-r--r--    1 root     system      4554279 Feb  5 2023  /opt/freeware/lib/libzstd.a
    

    Any suggestions what we could do to make it work?

    Many thanks in advance...

    kind regards



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------


  • 2.  RE: perl cpan install can't find library z

    Posted Wed August 09, 2023 05:51 AM

    Hello,

    you need to install "libssh2-devel", and the files /usr/lib/libssl.so and /usr/lib/libcrypto.so should not exist.

    Kind regards



    ------------------------------
    Josef Walzer
    ------------------------------



  • 3.  RE: perl cpan install can't find library z

    Posted Wed August 09, 2023 07:00 AM

    Hello Josef,

    thanks for the hint. libssh2-devel is already installed. Now I move the /usr/lib/libssl.so and /usr/lib/libcrypto.so but it is still the same error message "can't find library z"

    kind regards,



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 4.  RE: perl cpan install can't find library z

    Posted Thu August 10, 2023 12:33 PM

    Hi Joerg,

    Please install zlib-devel rpm package and retry.



    ------------------------------
    SANGAMESH
    ------------------------------



  • 5.  RE: perl cpan install can't find library z

    Posted Fri August 11, 2023 02:05 AM

    Hello Sangamesh,

    thanks for the hint. I must have overseen this...
    I installed the zlib-devel now and we will test it later.

    kind regards.



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------