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.  AIX 7.1 to 7.1 Upgrade breaks yum and other opensource apps

    Posted Mon October 18, 2021 01:33 PM
    After using nimadm to upgrade a server from 
    7100-05-08-2114
    to
    7200-05-03-2136
    and then updating the yum.con to point to 7.2 repos and running yum update, which completes successfully

    yum and sudo and other opensource apps stopped working  .

    yum - 
    Could not load program /opt/freeware/bin/python2:
    Dependent module libstdc++.a(libstdc++.so.6) could not be loaded.
    Could not load module libstdc++.a(libstdc++.so.6).
    System error: No such file or directory


    sudo - 
    Could not load program sudo:
    Could not load module /opt/freeware/lib/libintl.a(libintl.so.8).
    Dependent module libgcc_s.a(shr.o) could not be loaded.
    Could not load module libgcc_s.a(shr.o).
    System error: No such file or directory
    Could not load module sudo_32.
    Dependent module /opt/freeware/lib/libintl.a(libintl.so.8) could not be loaded.

    I have run 
    updtvpkg
    no change

    Thanks


    ------------------------------
    Nick Dimitroff
    ------------------------------


  • 2.  RE: AIX 7.1 to 7.1 Upgrade breaks yum and other opensource apps

    Posted Tue October 19, 2021 09:39 AM
    Here are some commands that might help troubleshoot this.

    Find out if there are any aix6.1 or aix7.1 specific packages that should be reinstalled with their aix7.2 equivalents:
    rpm -qla | grep ibm-aix | grep -v -e 'ibm-aix7\.2\.0\.0' -e pkg-config
    rpm -qla | grep ibm-aix | xargs rpm -qf | sort -u

    Here are some packages that may be a problem:
    $ rpm -qa | grep -i -e libstdc -e libintl -e libgcc | sort
    libgcc-8-1.ppc
    libgcc8-8.3.0-6.ppc
    libstdc++-8-1.ppc
    libstdc++-devel-8-1.ppc
    libstdc++8-8.3.0-6.ppc
    libstdc++8-devel-8.3.0-6.ppc
    $

    Here is a command to force reinstall using RPM, since YUM/DNF are not working:
    rpm -ivh --force libgcc*.rpm

    If DNF or YUM were working, I run these after any INSTALLP system update, since these have post install scripts that copy shared library objects to /opt/freeware or make other AIX specific updates to /opt/freeware:
    dnf reinstall -y krb5-libs libiconv libXrender openldap gcc8 \
    /var/cache/dnf/AIX_Toolbox_72-4f972c24490d78f0/packages/gcc8-8.3.0-6.aix7.2.ppc.rpm

    yum reinstall -y krb5-libs libiconv libXrender openldap gcc8


    These will find cached RPM files in YUM or DNF specific to AIX 7.1 or AIX 7.2:

    ls -ld /var/cache/???/AIX_Toolbox_71*/packages/*.aix7.1.ppc.rpm
    ls -ld /var/cache/???/AIX_Toolbox_72*/packages/*.aix7.2.ppc.rpm

    This would force reinstall all of the AIX 7.2 RPM packages that have been cached (you may need to manually download the AIX 7.2 RPM packages):
    rpm -ivh --force /var/cache/???/AIX_Toolbox_72*/packages/*.aix7.2.ppc.rpm


    These examples may help find packages that modify symlinks and/or shared libraries:

    rpm -qa --scripts|grep -wi ln

    rpm -qa --scripts|grep -wi ar

    $ rpm -q --scripts gettext
    preinstall scriptlet (using /bin/sh):
    if test -e /opt/freeware/lib/libintl.a.savgettext; then
    rm -f /opt/freeware/lib/libintl.a.savgettext
    fi
    postinstall scriptlet (using /bin/sh):
    /sbin/install-info /opt/freeware/info/gettext.info.gz /opt/freeware/info/dir || :
    preuninstall scriptlet (using /bin/sh):
    if [ "$1" = 0 ]; then
    /sbin/install-info --delete /opt/freeware/info/gettext.info.gz /opt/freeware/info/dir || :
    fi
    posttrans scriptlet (using /bin/sh):
    # Reinstate the LPP rpm.rte symlink, they have probably been replaced/removed
    # Get the LPP rpm.rte version first and check for rpm.rte version because
    # rpm.rte >= 4.13.0.4 ships files in "/usr/opt/rpm" path and
    # rpm.rte below that level ships files in "/usr/opt/freeware"

    ver=$(lslpp -Lc rpm.rte | /usr/bin/awk 'FNR==2' | /usr/bin/awk -F':' '{print $3}')
    f1=$(echo $ver | /usr/bin/cut -d"." -f1)
    f2=$(echo $ver | /usr/bin/cut -d"." -f2)
    f4=$(echo $ver | /usr/bin/cut -d"." -f4)

    # 3.0.5.x, 4.9.1.3, 4.13.0.x, 4.15.1.x are the various rpm.rte levels
    # It's enough to compare First, Second & Fourth fields against 4.13.0.4

    if [[ ( $f1 -gt 4 ) || ( $f1 -eq 4 && ( ( $f2 -gt 13 ) || ( ( $f2 -eq 13 ) && ( $f4 -ge 4 )))) ]]; then
    LINK_PATH="/usr/opt/rpm"
    else
    LINK_PATH="/usr/opt/freeware"
    fi
    if ! test -e /usr/lib/libintl.a && ! test -h /usr/lib/libintl.a
    then
    ln -sf ${LINK_PATH}/lib/libintl.a /usr/lib/libintl.a
    fi

    $

    ------------------------------
    Edward Davignon
    ------------------------------



  • 3.  RE: AIX 7.1 to 7.1 Upgrade breaks yum and other opensource apps

    Posted Tue October 19, 2021 12:52 PM
    Thanks
    I have resolved it by  downloading the AIX-Toolbox 72 DVD and reinstalling with

    rpm -Uvh ./ppc/gettext-0.20.2-1.aix6.1.ppc.rpm \
    ./ppc-7.2/libgcc-8-1.aix7.2.ppc.rpm \
    ./ppc-7.2/libgcc8-8.3.0-6.aix7.2.ppc.rpm \
    ./ppc/libiconv-1.16-1.aix6.1.ppc.rpm \
    ./ppc/glib2-2.56.1-3.aix6.1.ppc.rpm \
    ./ppc/libffi-3.2.1-3.aix6.1.ppc.rpm \
    ./ppc-7.2/libgomp8-8.3.0-6.aix7.2.ppc.rpm \
    ./ppc-7.2/libgomp-8-1.aix7.2.ppc.rpm \
    ./ppc-7.2/libstdc++-8-1.aix7.2.ppc.rpm \
    ./ppc-7.2/libstdc++8-8.3.0-6.aix7.2.ppc.rpm \
    ./ppc/libtextstyle-0.20.2-1.aix6.1.ppc.rpm \
    ./ppc/libunistring-0.9.10-1.aix6.1.ppc.rpm \
    ./ppc/libxml2-2.9.10-1.aix6.1.ppc.rpm \
    ./ppc/info-6.7-1.aix6.1.ppc.rpm \
    ./ppc/xz-libs-5.2.5-1.aix6.1.ppc.rpm \
    ./ppc/zlib-1.2.11-2.aix6.1.ppc.rpm \
    ./ppc/bash-5.1.4-2.aix6.1.ppc.rpm --replacepkgs

    I started with just libstdc++ and added all the other rpms based on the requirements

    ------------------------------
    Nick Dimitroff
    ------------------------------