Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  yum update breaks python and yum itself

    Posted Sat January 30, 2021 11:32 PM
    After sync-ing our yum repo to the latest toolbox rpms 2 days ago, in after more than 6 months, a yum update (which completed without errors) has now broken python2.7 and yum itself.

    root@server333 [/root]# yum
    There was a problem importing one of the Python modules
    required to run yum. The error leading to this problem was:
    0509-022 Cannot load module /opt/freeware/lib/python2.7/site-packages/rpm/_rpm.so.
    0509-150 Dependent module libpopt.so could not be loaded.
    0509-022 Cannot load module libpopt.so.
    0509-026 System error: A file or directory in the path name does not exist.
    0509-022 Cannot load module /opt/freeware/lib/python2.7/site-packages/rpm/_rpm.so.
    0509-150 Dependent module /opt/freeware/lib/python2.7/site-packages/rpm/_rpm.so could not be loaded.


    So I tried updating to the latest rpm.rte (after yum update), but that hasn't helped either. The error is now different, but still unusable python and yum.

    root@server333 [/root]# yum
    exec(): 0509-036 Cannot load program /opt/freeware/bin/python2 because of the following errors:
    0509-130 Symbol resolution failed for /opt/freeware/lib/libpython2.7.so because:
    0509-136 Symbol _GLOBAL__AIXI_libsqlite3_so (number 219) is not exported from
    dependent module /usr/opt/rpm/lib/libsqlite3.so.
    0509-136 Symbol _GLOBAL__AIXD_libsqlite3_so (number 220) is not exported from
    dependent module /usr/opt/rpm/lib/libsqlite3.so.
    0509-026 System error: Error 0
    0509-192 Examine .loader section symbols with the
    'dump -Tv' command.


    root@server333 [/root]# python
    exec(): 0509-036 Cannot load program python because of the following errors:
    0509-130 Symbol resolution failed for /opt/freeware/lib/libpython2.7.so because:
    0509-136 Symbol _GLOBAL__AIXI_libsqlite3_so (number 219) is not exported from
    dependent module /usr/opt/rpm/lib/libsqlite3.so.
    0509-136 Symbol _GLOBAL__AIXD_libsqlite3_so (number 220) is not exported from
    dependent module /usr/opt/rpm/lib/libsqlite3.so.
    0509-026 System error: Error 0
    0509-192 Examine .loader section symbols with the
    'dump -Tv' command.

    root@server333 [/root]# oslevel -s
    7100-05-06-2028


    With the following RPMs installed - all RPMs were installed from the IBM toolbox yum repo:
    root@server333 [/root]# rpm -qa
    python-iniparse-0.4-1.noarch
    python-urlgrabber-3.10.1-1.noarch
    yum-utils-1.1.31-2.noarch
    tcl-8.6.8-3.ppc
    freetype2-2.8-1.ppc
    cyrus-sasl-2.1.26-3.ppc
    info-6.6-2.ppc
    p11-kit-tools-0.23.16-1.ppc
    gdbm-1.18.1-1.ppc
    libXrender-0.9.8-2waixX11.ppc
    tk-8.6.8-3.ppc
    pysqlite-2.8.3-2.ppc
    gmp-6.1.2-1.ppc
    jq-1.6-1.ppc
    gzip-1.10-1.ppc
    screen-4.7.0-1.ppc
    bash-completion-2.9-2.noarch
    libdbi-0.9.0-1.ppc
    apr-1.5.2-1.ppc
    ganglia-gmond-3.7.2-2.ppc
    ganglia-mod_ibmnet-3.7.2-1.ppc
    ganglia-mod_ibmrperf-3.7.2-1.ppc
    libgcc8-8.3.0-4.ppc
    zlib-1.2.11-2.ppc
    libstdc++-8-1.ppc
    libssh2-1.9.0-1.ppc
    sqlite-3.32.3-1.ppc
    xz-libs-5.2.5-1.ppc
    perl-5.30.3-1.ppc
    lua-5.4.1-1.ppc
    libgomp-8-1.ppc
    libunistring-0.9.10-1.ppc
    libiconv-1.16-1.ppc
    python-2.7.18-1.ppc
    nagios-plugins-2.3.3-1.ppc
    krb5-libs-1.16.1-5.ppc
    libnghttp2-1.41.0-1.ppc
    vim-common-8.1.2424-1.ppc
    curl-7.72.0-1.ppc
    ncat-7.80-1.ppc
    socat-1.7.3.4-1.ppc
    python-tools-2.7.18-1.ppc
    coreutils-8.32-1.ppc
    python3-3.7.9-1.ppc
    dbus-1.13.18-1.ppc
    less-557-1.ppc
    AIX-rpm-7.1.5.32-4.ppc
    yum-metadata-parser-1.1.4-2.ppc
    libffi-3.2.1-3.ppc
    bzip2-1.0.8-2.ppc
    fontconfig-2.11.95-4.ppc
    glib2-2.56.1-2.ppc
    readline-8.0-2.ppc
    p11-kit-0.23.16-1.ppc
    libXft-2.3.2-4waixX11.ppc
    python-pycurl-7.43.0-1.ppc
    expect-5.45.4-1.ppc
    mpfr-4.0.2-2.ppc
    libpcap-1.9.1-1.ppc
    logrotate-3.14.0-4.ppc
    gawk-5.0.1-1.ppc
    tar-1.32-1.ppc
    unzip-6.0-3.ppc
    wget-1.20.3-1.ppc
    libconfuse-3.2.2-2.ppc
    ganglia-lib-3.7.2-2.ppc
    ganglia-mod_ibmpower-3.7.2-1.ppc
    ganglia-mod_ibmfc-3.7.2-1.ppc
    sudo-1.9.5p2-1.ppc
    libgcc-8-1.ppc
    libstdc++8-8.3.0-4.ppc
    ncurses-6.2-2.ppc
    expat-2.2.9-2.ppc
    pcre-8.44-1.ppc
    db-6.2.38-3.ppc
    openldap-2.4.56-1.ppc
    libgomp8-8.3.0-4.ppc
    libtextstyle-0.20.2-1.ppc
    libxml2-2.9.10-1.ppc
    gettext-0.20.2-1.ppc
    bash-5.0.18-1.ppc
    nmap-7.80-1.ppc
    lz4-1.9.2-1.ppc
    ca-certificates-2020.06.01-1.ppc
    vim-enhanced-8.1.2424-1.ppc
    rsync-3.2.3-1.ppc
    nagios-nrpe-4.0.3-1.ppc
    yum-3.4.3-8.noarch
    python-devel-2.7.18-1.ppc
    popt-1.18-1.ppc
    grep-3.4-1.ppc
    oniguruma-6.9.6-1.ppc


    root@server333 [/root]# lslpp -lc rpm.rte
    #Fileset:Level:PTF Id:State:Type:Description:EFIX Locked
    /usr/lib/objrepos:rpm.rte:4.15.1.1::COMMITTED:I:RPM Package Manager:
    /etc/objrepos:rpm.rte:4.15.1.1::COMMITTED:I:RPM Package Manager:


    Has anyone else experienced this issue ?

    ------------------------------
    Dennis Mathews
    ------------------------------

    #AIXOpenSource


  • 2.  RE: yum update breaks python and yum itself

    Posted Mon February 01, 2021 12:30 AM
    Please check if you have any LIBPATH set.
    I think LIBPATH is first pointing to /usr/opt/rpm/lib, in that case i would recommend to have that in the last.

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



  • 3.  RE: yum update breaks python and yum itself

    Posted Mon February 01, 2021 03:40 AM
    LIBPATH is not set anywhere from what I can see.

    root@server333 [/root]# echo $LIBPATH $LD_LIBRARY_PATH

    root@server333 [/root]# env|grep PATH
    MANPATH=/usr/share/man:/usr/local/man:/opt/freeware/man:/opt/freeware/share/man
    PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/local/bin:/usr/java8_64/jre/bin:/usr/java8_64/bin:/usr/linux/bin:/opt/freeware/bin:/usr/symcli/bin:/usr/lpp/EMC/Symmetrix/bin
    LOCPATH=/usr/lib/nls/loc
    NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/en_US.8859-15/%N:/usr/lib/nls/msg/%L/%N.cat:/usr/lib/nls/msg/en_US.8859-15/%N.cat
    root@server333 [/root]#
    root@server333 [/root]# yum
    exec(): 0509-036 Cannot load program /opt/freeware/bin/python2 because of the following errors:
    0509-130 Symbol resolution failed for /opt/freeware/lib/libpython2.7.so because:
    0509-136 Symbol _GLOBAL__AIXI_libsqlite3_so (number 219) is not exported from
    dependent module /usr/opt/rpm/lib/libsqlite3.so.
    0509-136 Symbol _GLOBAL__AIXD_libsqlite3_so (number 220) is not exported from
    dependent module /usr/opt/rpm/lib/libsqlite3.so.
    0509-026 System error: Error 0
    0509-192 Examine .loader section symbols with the
    'dump -Tv' command.

    ------------------------------
    Dennis Mathews
    ------------------------------



  • 4.  RE: yum update breaks python and yum itself

    Posted Mon February 01, 2021 04:09 AM
    Share the below outputs
    ls -l /opt/freeware/lib/libsqlite3.so
    file /opt/freeware/lib/libsqlite3.so

    Try to re-install sqlite rpm.

    rpm -Uvh --force sqlite-3.32.3-1.aix6.1.ppc.rpm

    ------------------------------
    Ayappan P
    ------------------------------



  • 5.  RE: yum update breaks python and yum itself

    Posted Mon February 01, 2021 04:51 AM
    root@server333 [mnt/aix/yumrepo]# ls -l /opt/freeware/lib/libsqlite3.so
    lrwxrwxrwx 1 root system 30 31 Jan 14:32 /opt/freeware/lib/libsqlite3.so -> /usr/opt/rpm/lib/libsqlite3.so
    root@server333 [mnt/aix/yumrepo]# file /opt/freeware/lib/libsqlite3.so
    /opt/freeware/lib/libsqlite3.so: executable (RISC System/6000) or object module not stripped
    root@server333 [mnt/aix/yumrepo]# rpm -Uvh --force ./AIX_Toolbox/sqlite/sqlite-3.32.3-1.aix6.1.ppc.rpm
    Verifying... ################################# [100%]
    Preparing... ################################# [100%]
    Updating / installing...
    1:sqlite-3.32.3-1 ################################# [ 50%]
    Cleaning up / removing...
    2:sqlite-3.32.3-1 ################################# [100%]
    root@server333 [mnt/aix/yumrepo]#
    root@server333 [mnt/aix/yumrepo]# yum
    There was a problem importing one of the Python modules
    required to run yum. The error leading to this problem was:

    rtld: 0712-001 Symbol _GLOBAL__AIXI_libbz2_so was referenced
    from module /opt/freeware/lib/python2.7/lib-dynload/bz2.so(), but a runtime definition
    of the symbol was not found.
    rtld: 0712-001 Symbol _GLOBAL__AIXD_libbz2_so was referenced
    from module /opt/freeware/lib/python2.7/lib-dynload/bz2.so(), but a runtime definition
    of the symbol was not found.

    Please install a package which provides this module, or
    verify that the module is installed correctly.

    It's possible that the above module doesn't match the
    current version of Python, which is:
    2.7.18 (default, May 4 2020, 03:46:51)
    [GCC 8.3.0]

    ------------------------------
    Dennis Mathews
    ------------------------------



  • 6.  RE: yum update breaks python and yum itself

    Posted Mon February 01, 2021 06:12 AM
    I am not sure how the symbolic links are messed up.
    Installing rpm.rte will create symbolic links to /usr/opt/rpm/lib only if the libraries are not found in /opt/freeware/lib.

    For the above error, you need to reinstall bzip2 rpm, same like sqlite.

    ------------------------------
    Ayappan P
    ------------------------------



  • 7.  RE: yum update breaks python and yum itself

    Posted Mon February 01, 2021 06:29 AM
    Reinstalling bzip2 has fixed it!
    I ran the yum update all on 2 of our test LPARs which were both at the same level of RPMs and they both ended up in exactly the same state, so not sure where I went wrong. I was worried it might have been caused by the jump from an old repo (6+ months since last reposync). We have a many LPARs to now update, so hopefully this solution will work if we end up in a similar situation again. Thanks Ayappan!

    root@server333 [mnt/aix/yumrepo]# rpm -Uvh --force ./AIX_Toolbox/bzip2/bzip2-1.0.8-2.aix6.1.ppc.rpm
    Verifying... ################################# [100%]
    Preparing... ################################# [100%]
    Updating / installing...
    1:bzip2-1.0.8-2 ################################# [ 50%]
    Cleaning up / removing...
    2:bzip2-1.0.8-2 ################################# [100%]
    root@server333 [mnt/aix/yumrepo]#
    root@server333 [mnt/aix/yumrepo]# yum
    You need to give some command
    Usage: yum [options] COMMAND

    ------------------------------
    Dennis Mathews
    ------------------------------