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.  yum command fails with error Symbol resolution failed for /opt/freeware/lib/libxml2.a(libxml2.so.2)

    Posted Mon April 11, 2022 12:28 PM
    yum command fails with below error 
    root@user#> yum
    There was a problem importing one of the Python modules
    required to run yum. The error leading to this problem was:

    Symbol resolution failed for /opt/freeware/lib/libxml2.a(libxml2.so.2) because:
    Symbol _GLOBAL__AIXI_libz_so (number 4) is not exported from dependent
    module /opt/freeware/lib/libz.a(libz.so.1).
    Symbol _GLOBAL__AIXD_libz_so (number 5) is not exported from dependent
    module /opt/freeware/lib/libz.a(libz.so.1).
    Could not load module /opt/freeware/lib/python2.7/site-packages/_sqlitecache.so.
    System error: Exec format error
    Examine .loader section symbols with the 'dump -Tv' command.

    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.15 (default, Jan 2 2019, 18:23:13)
    [GCC 6.3.0]

    If you cannot solve this problem yourself, please go to
    the yum faq at:
    http://yum.baseurl.org/wiki/Faq

    Other outputs which might be handy

    root@user#> ldd /opt/freeware/lib/python2.7/site-packages/_sqlitecache.so
    /opt/freeware/lib/python2.7/site-packages/_sqlitecache.so needs:
    /usr/lib/libglib-2.0.a(libglib-2.0.so.0)
    /usr/lib/libxml2.a(libxml2.so.2)
    /usr/lib/libsqlite3.a(libsqlite3.so.0)
    /usr/lib/libc.a(shr.o)
    /usr/lib/librtl.a(shr.o)
    /opt/freeware/lib/libgcc_s.a(shr.o)
    /usr/lib/libiconv.a(shr4.o)
    /usr/lib/libpthreads.a(shr_xpg5.o)
    /usr/lib/libintl.a(libintl.so.8)
    /usr/lib/libpthread.a(shr_xpg5.o)
    /unix
    /usr/lib/libcrypt.a(shr.o)
    /usr/lib/libpthreads.a(shr_comm.o)
    /usr/lib/libiconv.a(libiconv.so.2)
    ar: 0707-109 Member name libiconv.so.2 does not exist.
    dump: /tmp/tmpdir19595734/extract/libiconv.so.2: 0654-106 Cannot open the specified file.

    libiconv.so.2 is not part of the archive /usr/lib/libiconv.a

    root@id13z0dppan14:/osAIX/72/SP-7200-05-03-2136/installp/ppc> ar -v -t /usr/lib/libiconv.a
    rwxr-x--- 300/300 234270 Oct 14 11:32 2019 shr4.o
    rwxr-x--- 300/300 234520 Oct 14 11:32 2019 shr.o

    LIBPATH is not set, but for the above libconv error,  if I set LIBPATH to /usr/opt/rpm/lib, there is no error. Nevertheless it doesn't make any difference and the error remains. 

    root@user#> export LIBPATH=/usr/opt/rpm/lib
    root@user#> ldd /opt/freeware/lib/python2.7/site-packages/_sqlitecache.so
    /opt/freeware/lib/python2.7/site-packages/_sqlitecache.so needs:
    /usr/lib/libglib-2.0.a(libglib-2.0.so.0)
    /usr/lib/libxml2.a(libxml2.so.2)
    /usr/opt/rpm/lib/libsqlite3.a(libsqlite3.so.0)
    /usr/lib/libc.a(shr.o)
    /usr/lib/librtl.a(shr.o)
    /opt/freeware/lib/libgcc_s.a(shr.o)
    /usr/lib/libiconv.a(shr4.o)
    /usr/lib/libpthreads.a(shr_xpg5.o)
    /usr/opt/rpm/lib/libintl.a(libintl.so.8)
    /usr/lib/libpthread.a(shr_xpg5.o)
    /unix
    /usr/lib/libcrypt.a(shr.o)
    /usr/lib/libpthreads.a(shr_comm.o)

    Here are other necessary outputs

    root@user#> rpm -qf /opt/freeware/lib/libz.a
    zlib-1.2.11-2.ppc

    I even upgraded zlib from zlib-1.2.11-1.ppc to zlib-1.2.11-2.ppc, didn't make any difference.  I also removed yum version yum-3.4.3-5.noarch and reinstalled yum-3.4.3-6.noarch along with its dependencies. Didn't make any difference. 

    root@user#> rpm -qf /opt/freeware/lib/python2.7/site-packages/_sqlitecache.so
    yum-metadata-parser-1.1.4-2.ppc
    root@user#> rpm -qa | grep -i yum
    yum-3.4.3-6.noarch
    yum-metadata-parser-1.1.4-2.ppc
    yum-utils-1.1.31-2.noarch

    And libz.so.1 is part of archive /opt/freeware/lib/libz.a

    root@user#> ar -v -t /opt/freeware/lib/libz.a
    rwxr-xr-x 205/1 164939 Dec 17 10:29 2020 libz.so.1
    rwxr-xr-x 205/1 164939 Dec 17 10:29 2020 shr.o

    Please help me make yum work. I am not quite sure how it broke, I suppose some user/developer must have tried installing some additional package and broke yum. 



    ------------------------------
    Durairaja Krishnan
    ------------------------------


  • 2.  RE: yum command fails with error Symbol resolution failed for /opt/freeware/lib/libxml2.a(libxml2.so.2)

    Posted Tue April 12, 2022 12:11 AM
    Hi
    You said LIBPATH is not set - I compared mine (<)  to yours (>)

    < /opt/freeware/lib/libglib-2.0.a(libglib-2.0.so.0)
    > /usr/lib/libglib-2.0.a(libglib-2.0.so.0)

    < /opt/freeware/lib/libsqlite3.a(libsqlite3.so.0)
    > /usr/lib/libsqlite3.a(libsqlite3.so.0)

    < /opt/freeware/lib/libiconv.a(libiconv.so.2)
    > /usr/lib/libiconv.a(libiconv.so.2)

    You can check /usr/lib for these files.  Perhaps some other package created these links in the past.
    However, for libiconv.a (libiconv.so.2) it really seems that LIBPATH is set to /usr/lib.

    I would check the following:

    # ls -al /usr/lib/libglib-2.0.a
    # ls -al /usr/lib/libsqlite3.a
    # ls -al /usr/lib/libz*
    # lppchk -c bos.rte.iconv 
    # env 

    ​​​​​

    ------------------------------
    Jan Harris
    AIX Development Support (Liaison to the AIX Toolbox for Open Source)
    IBM (Contract)
    Austin TX
    ------------------------------



  • 3.  RE: yum command fails with error Symbol resolution failed for /opt/freeware/lib/libxml2.a(libxml2.so.2)

    Posted Tue April 12, 2022 04:46 AM

    Well I don't seem to find anything set for LIBPATH, here are the outputs you have requested. 

    root@user:/> ls -al /usr/lib/libglib-2.0.a
    lrwxrwxrwx 1 root system 36 Apr 11 02:49 /usr/lib/libglib-2.0.a -> ../../opt/freeware/lib/libglib-2.0.a
    root@user:/> ls -al /usr/lib/libsqlite3.a
    lrwxrwxrwx 1 root system 35 Jan 27 2020 /usr/lib/libsqlite3.a -> ../../opt/freeware/lib/libsqlite3.a
    root@user:/> ls -al /usr/lib/libz*
    lrwxrwxrwx 1 root system 23 Apr 11 06:34 /usr/lib/libz.a -> /usr/opt/rpm/lib/libz.a
    root@user:/> lppchk -c bos.rte.iconv

    root@user:/> env
    _=/usr/bin/env
    LANG=en_US
    LOGIN=root
    CLCMD_PASSTHRU=1
    PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/bin:/usr/bin/X11:/sbin
    LC__FASTMSG=true
    LOGNAME=root
    MAIL=/usr/spool/mail/root
    HOSTNAME=id13z0dppan14
    LOCPATH=/usr/lib/nls/loc
    PS1=$LOGNAME@$HOSTNAME:$PWD>
    USER=root
    AUTHSTATE=files
    SHELL=/usr/bin/ksh
    ODMDIR=/etc/objrepos
    TMOUT=1800
    HOME=/
    TERM=xterm-256color
    MAILMSG=[YOU HAVE NEW MAIL]
    PWD=/
    TZ=US/Eastern
    A__z=! LOGNAME="*TMOUT
    NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat:/usr/lib/nls/msg/%l.%c/%N:/usr/lib/nls/msg/%l.%c/%N.cat
     


    ------------------------------
    Durairaja Krishnan
    ------------------------------



  • 4.  RE: yum command fails with error Symbol resolution failed for /opt/freeware/lib/libxml2.a(libxml2.so.2)
    Best Answer

    Posted Tue April 12, 2022 03:18 AM
    Looks like libxml2 is not from AIX Toolbox. Please install the one from Toolbox and try again.
    Also it is recommended to move to dnf as yum is out of support for quite sometime.

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



  • 5.  RE: yum command fails with error Symbol resolution failed for /opt/freeware/lib/libxml2.a(libxml2.so.2)

    Posted Tue April 12, 2022 04:57 AM
    Edited by Durairaja Krishnan Tue April 12, 2022 07:00 AM

    Awesome, it worked after upgrading libxml2, 

    root@user:/> rpm -Uvh libxml2-2.9.11-1.aix6.1.ppc.rpm libgcc-8.3.0-1.aix7.2.ppc.rpm libstdcplusplus-8.3.0-1.aix7.2.ppc.rpm
    Verifying... ################################# [100%]
    Preparing... ################################# [100%]
    Updating / installing...
    1:libgcc-8.3.0-1 ################################# [ 17%]
    2:libxml2-2.9.11-1 ################################# [ 33%]
    3:libstdc++-8.3.0-1 ################################# [ 50%]
    Cleaning up / removing...
    4:libstdc++-8.1.0-2 ################################# [ 67%]
    5:libxml2-2.9.10-1 ################################# [ 83%]
    6:libgcc-8.1.0-2

    Thanks for all the help. Will plan to move from yum to dnf. 



    ------------------------------
    Durairaja Krishnan
    ------------------------------