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


#Servers
#Opensource
 View Only
  • 1.  Error running YUM updater

    Posted 03/29/22 05:20 PM
    We are running this version of rpm.rte,

    />lslpp -L rpm.rte
    Fileset Level State Type Description (Uninstaller)
    ----------------------------------------------------------------------------
    rpm.rte 4.15.1.3 C F RPM Package Manager

    Getting these errors when trying to update packages using yum,

    />yum install gettext
    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-026 System error: Cannot run a file that does not have a valid format.

    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.12 (default, Feb 20 2017, 03:32:43) [C]

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

    No sure how to go about resolving this issue.

    ------------------------------
    Steve Mckinney
    ------------------------------

    #AIXOpenSource


  • 2.  RE: Error running YUM updater

    Posted 03/30/22 09:25 AM
    Can you please provide little history if yum was working ever and this problem started coming due to some update ? 
    Looks like /opt/freeware/lib/python2.7/site-packages/rpm/_rpm.so is corrupted.
    Can you check with lppchk if rpm.rte fileset is intact and file provided by that are not corrupted. 


    ------------------------------
    SANKET RATHI
    ------------------------------



  • 3.  RE: Error running YUM updater

    Posted 03/30/22 10:45 AM
    @SANKET RATHI So, I've taken over administration of these server from previous administrators and I can't say if there has been an issue in the past however the server was upgraded to 7.2. TL5 back in November last year and I would have to say maybe that might have contributed to this issue.

    Here is my lppchk output,

    />lslpp -L rpm.rte
    Fileset Level State Type Description (Uninstaller)
    ----------------------------------------------------------------------------
    rpm.rte 4.15.1.3 C F RPM Package Manager


    State codes:
    A -- Applied.
    B -- Broken.
    C -- Committed.
    E -- EFIX Locked.
    O -- Obsolete. (partially migrated to newer version)
    ? -- Inconsistent State...Run lppchk -v.

    Type codes:
    F -- Installp Fileset
    P -- Product
    C -- Component
    T -- Feature
    R -- RPM Package
    E -- Interim Fix



    ------------------------------
    Steve Mckinney
    ------------------------------



  • 4.  RE: Error running YUM updater

    Posted 03/30/22 11:45 AM
    @SANKET RATHI Sorry, I ran lppchk -v and -c on rpm.rte and there was no output from these checks.

    ------------------------------
    Steve Mckinney
    ------------------------------



  • 5.  RE: Error running YUM updater

    Posted 03/30/22 01:48 PM
    This is the output for lppchk -c,

    />lppchk -c
    lppchk: 0504-206 File /usr/bin/isodump could not be located.
    lppchk: 0504-206 File /usr/bin/isoinfo could not be located.
    lppchk: 0504-206 File /usr/bin/devdump could not be located.
    lppchk: 0504-206 File /usr/bin/cdrecord could not be located.
    lppchk: 0504-206 File /usr/bin/mkisofs could not be located.
    lppchk: 0504-206 File /usr/bin/readcd could not be located.
    lppchk: 0504-206 File /usr/bin/isovfy could not be located.
    lppchk: 0504-208 Size of /etc/centrifydc/ssh/sshd_config is 4167,
    expected value was 4152.
    lppchk: 0504-206 File /etc/cdrecord.conf could not be located.

    ------------------------------
    Steve Mckinney
    ------------------------------



  • 6.  RE: Error running YUM updater

    Posted 04/04/22 10:50 AM
    Can you please share output of 
    # ls -l /opt/freeware/lib/python2.7/site-packages/rpm/_rpm.so
    # cksum /opt/freeware/lib/python2.7/site-packages/rpm/_rpm.so
    # rpm -qa | grep rpm 

    ​​​

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 7.  RE: Error running YUM updater

    Posted 04/05/22 10:24 AM
    @SANKET RATHI Here are the outputs,

    />ls -l /opt/freeware/lib/python2.7/site-packages/rpm/_rpm.so
    lrwxrwxrwx 1 root system 52 Oct 28 06:47 /opt/freeware/lib/python2.7/site-packages/rpm/_rpm.so -> /usr/opt/rpm/lib/python2.7/site-packages/rpm/_rpm.so

    ​/>cksum /opt/freeware/lib/python2.7/site-packages/rpm/_rpm.so
    484966649 313525 /opt/freeware/lib/python2.7/site-packages/rpm/_rpm.so

    />rpm -qa | grep rpm
    AIX-rpm-7.2.5.100-15.ppc

    ------------------------------
    Steve Mckinney
    ------------------------------



  • 8.  RE: Error running YUM updater

    Posted 04/05/22 11:39 AM
    Can you please check what is  /opt/freeware/bin/python2 is pointing to ?
    I guess this is point to 64-bit python instead of 32 version.
    YUM uses default 32-bit python /opt/freeware/bin/python2.

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



  • 9.  RE: Error running YUM updater

    Posted 04/05/22 01:24 PM
    @SANGAMESH MALLAYYA It looks like python is pointed to the 64-bit version but python is pointed to python2.7

    lrwxrwxrwx 1 root system 12 Mar 26 02:11 python -> python2.7_64
    lrwxrwxrwx 1 root system 14 Oct 28 06:02 python-config -> python2-config
    lrwxrwxrwx 1 root system 9 Oct 28 06:02 python2 -> python2.7
    lrwxrwxrwx 1 root system 16 Oct 28 06:02 python2-config -> python2.7-config
    -rwxr-xr-x 1 root system 0 Mar 26 02:02 python2.7
    -rwxr-xr-x 1 root system 1690 Feb 20 2017 python2.7-config
    -rwxr-xr-x 1 root system 160404 Feb 20 2017 python2.7_64
    -rw-r--r-- 1 root system 1693 Feb 20 2017 python2.7_64-config
    lrwxrwxrwx 1 root system 12 Oct 28 06:02 python2_64 -> python2.7_64
    lrwxrwxrwx 1 root system 19 Oct 28 06:02 python2_64-config -> python2.7_64-config
    lrwxrwxrwx 1 root system 17 Oct 28 06:02 python_64-config -> python2_64-config​

    ------------------------------
    Steve Mckinney
    ------------------------------



  • 10.  RE: Error running YUM updater

    Posted 04/06/22 02:12 PM
    Hi Steve,

    Looks like python soft link is correct but python2.7 binary size it shows is zero.
    Please check if your python2 installation is fine with "rpm -V"
    Also try import yum with python2 to findout more about the issue.

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