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
------------------------------