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.  Install Perl Term::ReadKey AIX

    Posted Mon March 24, 2025 02:20 PM

    I am trying to find the best way to install Perl Term:ReadKey on our AIX servers.  Our Oracle DBAs are looking to use a new script, from Oracle I believe, and they are getting an error:

    Can't locate Term/ReadKey.pm in @INC (you may need to install the Term::ReadKey module) (@INC contains: /oracle/product/19c/rdbms/admin /usr/opt/perl5/lib/site_perl/5.28.1/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.28.1 /usr/opt/perl5/lib/5.28.1/aix-thread-multi /usr/opt/perl5/lib/5.28.1 /usr/opt/perl5/lib/site_perl/5.20.1 /usr/opt/perl5/lib/site_perl) at /oracle/product/19c/rdbms/admin/catcdb.pl line 37.



    ------------------------------
    Joshua Krause
    ------------------------------


  • 2.  RE: Install Perl Term::ReadKey AIX

    Posted Tue March 25, 2025 09:13 AM

    Joshua,

    the usual way of installing would be open CPAN and install it like

    /usr/opt/perl5/bin/cpan Term::ReadKey

    But the requirement is to have an Internet connection.

    You can download the package from CPAN archive - https://metacpan.org/pod/Term::ReadKey, copy it to your AIX system and use the same command to install it:

    /usr/opt/perl5/bin/cpan TermReadKey-2.38.tar.gz

    On my test system it produced "Memory fault" in both cases. I didn't look in detail what was the reason.

    The third way is a manual way. Unpack the downloaded archive, switch into the directory, prepare the Makefile and install the module:

    /usr/opt/perl5/bin/perl Makefile.PL
    make install

    It looks like the module requires IBM "Classic" XL C/C++ 16.1 compiler to be installed.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 3.  RE: Install Perl Term::ReadKey AIX

    Posted Tue March 25, 2025 02:45 PM

    I was able to get it installed by downloading it, but I did have to install XL C/C++ compiler.  If I can get the cpan url whitelisted on my side and install that way, would it still require the compiler?



    ------------------------------
    Joshua Krause
    ------------------------------



  • 4.  RE: Install Perl Term::ReadKey AIX

    Posted Tue March 25, 2025 03:40 PM

    I assume that, yes, it will still require the compiler. If it has some C code, it always has it.

    On other side, you can compile it on one server with the compiler and install it into some temporary directory like:

    make install DESTDIR=/tmp/myperlmod

    Then, copy the directory's contents to / of your target servers.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 5.  RE: Install Perl Term::ReadKey AIX

    Posted Wed March 26, 2025 05:42 AM

    Hi Andrey,

    Will that leave a clean load path on the binaries, or do we risk including /tmp/myperlmod in the load path?



    ------------------------------
    José Pina Coelho
    IT Specialist at Kyndryl
    ------------------------------



  • 6.  RE: Install Perl Term::ReadKey AIX

    Posted Wed March 26, 2025 05:58 AM

    Hi Jose,

    as far as I can see, the load paths are "clean".

    The option only copies the installation files, not into /, but creates all sub-directories under the specified directory. It is a usual option used during RPM/BFF package creation to temporarily stage files in some directory and then pack them into a package.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------