PROBLEM: An AIX user recently updated AIX to 7.2. They had installed the DBI module to their previous system perl.rte installation. Their application failed to load after the update, since DBI could not be loaded.
CAUSE: AIX System perl.rte updates do not migrate custom installed modules.
SOLUTION: If you use the perl.rpm from the AIX Toolbox, you will not bind your applications to the system perl, and will have control over updates.
CORRECTIVE STEPS: Install perl.rpm, then use that cpan to install the module.
Details:
The user was advised to use DNF to install perl.rpm, to avoid dependency issues.
He ran the dnf_aixtoolbox.sh script:
# dnf_aixtoolbox.sh -d
Next, he ran the recommended update.
# dnf update
This command failed, due to libcrypto.a errors from a non-Toolbox openssl package. The system had many old packages which were not obtained from IBM. Efforts to remove the openssl package created more circular failures, so we opted to use the destroyRPMS script to remove all existing packages.
***Note: You can backup the directory before running this script.
# tar -cvf /export/lpp_source/freeware.backup.tar ./opt/freeware
The destroyRPMS script did not completely remove rpm.rte, so it needed to be reinstalled.
We downloaded the latest rpm.rte and did a forced overwrite.
# installp -qaXFY -d . rpm.rte
Next, we ran the DNF install script again:
# dnf_aixtoolbox.sh -d
Next, we updated the DNF related packages:
# dnf update
The objective was to install perl.rpm and use CPAN to install modules, so we needed to install the gcc compiler.
# dnf install gcc
Then we could install the latest perl (5.30)
# dnf install perl
The customer had used CPAN for AIX System perl, so we wanted to start with a clean ~/.cpan configuration.
# mv /.cpan /.cpan.system
Next, we used the installation instructions for DBI.
Important: Use the /opt/freeware/bin path for the perl.rpm installation!
# /opt/freeware/bin/perl -MCPAN -e shell
cpan[1]> install DBI
<..... module was compiled....>
cpan[1]> exit
Finally, verify the module:
# /opt/freeware/bin/cpan -l | grep DBI