User Tools

Site Tools


aix:rpm_lib_error

Library error using RPMs

libxml2

[root@aixa003] /mnt/rpms_ibm/aix/aix72> yum update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   Could not load module /opt/freeware/lib/libxml2.a(libxml2.so.2).
        Dependent module /usr/lib/libiconv.a(libiconv.so.2) could not be loaded.
        Member libiconv.so.2 is not found in archive
Could not load module /opt/freeware/lib/python2.7/site-packages/_sqlitecache.so.
        Dependent module /opt/freeware/lib/libxml2.a(libxml2.so.2) could not be loaded.

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.10 (default, Jun 22 2016, 05:57:59) [C]

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

Check if the libxml2.a exists, else create the symbolic link

[root@aixa003] /mnt/rpms_ibm/aix/aix72> ll /usr/lib/libxml2.a
/usr/lib/libxml2.a not found
[root@aixa003] /mnt/rpms_ibm/aix/aix72> ln -s /usr/ccs/lib/libxml2.a /usr/lib/libxml2.a

openssl

[root@aixb198] /mnt/rpms_ibm/aix/aix72> yum update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   Could not load module /opt/freeware/lib/python2.7/site-packages/pycurl.so.
        Dependent module /opt/freeware/lib/libcrypto.a(libcrypto.so) could not be loaded.
        Member libcrypto.so is not found in archive
Could not load module /opt/freeware/lib/python2.7/site-packages/pycurl.so.
        Dependent module /opt/freeware/lib/python2.7/site-packages/pycurl.so could not be loaded.

Remove openssl current RPM package:

[root@aixb198] /mnt> rpm -e openssl

openssl

Example of error

root@sps62001_adm:/mnt/linuxsw/aixtoolbox/yum_bundle_v1# 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 /usr/lib/libcurl.a(libcurl.so.4).
        0509-150   Dependent module /usr/lib/libcrypto.a(libcrypto.so.1.0.1) could not be loaded.
        0509-152   Member libcrypto.so.1.0.1 is not found in archive
        0509-022 Cannot load module /opt/freeware/lib/python2.7/site-packages/pycurl.so.
        0509-150   Dependent module /usr/lib/libcurl.a(libcurl.so.4) could not be loaded.
        libssl.a(libssl.so.0.9.8) is needed by curl-7.19.6-1ssl

Solution 1

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

Solution 2

Convert the AIX static library .a to a dynamic library .so

root@sps62001_adm:/mnt# cd /usr/lib
root@sps62001_adm:/usr/lib# ar -xv libssl.a
root@sps62001_adm:/usr/lib# ar -xv libcrypto.a
root@sps62001_adm:/usr/lib# ls libssl* libcrypto*
libssl.a 
libssl.so.0.9.8 
libcrypto.a
libcrypto.so.0.9.8
root@sps62001_adm:/usr/lib# ln -s libssl.so.0.9.8 libssl.so
root@sps62001_adm:/usr/lib# ln -s libcrypto.so.0.9.8 libcrypto.so

Solution 3

If the RPM package is correctly installed, then refreah the RPM database to relink all libraries.

root@sps62001_adm:/mnt# /usr/sbin/updtvpkg

Solution 4

Set the LIBPATH variable before starting yum LIBPATH=/opt/freeware/lib:/usr/lib ; yum -y install rsync

Explanation : 
# ls -l /usr/lib/libgssapi_krb5.a
   lrwxrwxrwx    1 root     security         30 Oct 16 15:35 /usr/lib/libgssapi_krb5.a -> /usr/krb5/lib/libgssapi_krb5.a
# lslpp -w /usr/krb5/lib/libgssapi_krb5.a
   File                                        Fileset               Type
   ----------------------------------------------------------------------------
   /usr/krb5/lib/libgssapi_krb5.a              krb5.client.rte       File
# rpm -ql krb5-libs-1.16.1-2.ppc
   /opt/freeware/lib/libgssapi_krb5.a
   
[root@aix01] /root # yum update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   Could not load module /usr/lib/libcurl.a(libcurl.so.4).
        Dependent module /usr/lib/libgssapi_krb5.a(libgssapi_krb5.so) could not be loaded.
        Member libgssapi_krb5.so is not found in archive
Could not load module /opt/freeware/lib/python2.7/site-packages/pycurl.so.
        Dependent module /usr/lib/libcurl.a(libcurl.so.4) could not be loaded.

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.16 (default, Mar 12 2019, 21:23:24)
[GCC 6.3.0]

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

[root@aix01] /root # LIBPATH=/opt/freeware/lib:/usr/lib ; yum -y install rsync
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rsync.ppc 0:3.1.3-2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================
 Package                       Arch                        Version                            Repository                               Size
============================================================================================================================================
Installing:
 rsync                         ppc                         3.1.3-2                            AIX_Toolbox_ppc                         722 k

Transaction Summary
============================================================================================================================================
Install       1 Package
aix/rpm_lib_error.txt · Last modified: 2021/01/01 21:22 (external edit)