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.  AIX 7.2 python dnf - Exec format error

    Posted Fri October 21, 2022 06:23 AM
    # /opt/freeware/bin/python3
    Python 3.7.12 (default, Dec 15 2021, 03:25:47)
    [GCC 8.3.0] on aix6
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import dnf
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/opt/freeware/lib/python3.7/site-packages/dnf/__init__.py", line 32, in <module>
        import dnf.base
      File "/opt/freeware/lib/python3.7/site-packages/dnf/base.py", line 29, in <module>
        import libdnf.transaction
      File "/opt/freeware/lib/python3.7/site-packages/libdnf/__init__.py", line 3, in <module>
        from . import common_types
      File "/opt/freeware/lib/python3.7/site-packages/libdnf/common_types.py", line 13, in <module>
        from . import _common_types
    ImportError: Could not load module /opt/freeware/lib/python3.7/site-packages/libdnf/_common_types.so.
    System error: Exec format error
    ​

    The same error when I use python3_64. Everything is updated:

    # dnf clean all
    35 files removed
    # dnf -y update
    AIX generic repository                                                 471 kB/s |  19 MB     00:41
    AIX noarch repository                                                  343 kB/s | 1.8 MB     00:05
    AIX 7.2 specific repository                                            337 kB/s | 1.2 MB     00:03
    Last metadata expiration check: 0:00:04 ago on Fri Oct 21 12:21:14 2022.
    Dependencies resolved.
    Nothing to do.
    Complete!
    

    What do I do wrong?



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------

    #AIXOpenSource


  • 2.  RE: AIX 7.2 python dnf - Exec format error

    Posted Fri October 21, 2022 07:00 AM
    dnf & dnf modules are only 32-bit in AIX 7.1 & 7.2 ( because rpm is 32bit there) 
    So using the default python3 (which is 64bit) you can't import a 32bit module. 
    But you can do that with 32bit python "/opt/freeware/bin/python3_32". 
    In AIX 7.3 , rpm ,dnf & dnf modules are all 64bit. So you can import using the default 64bit python3.

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



  • 3.  RE: AIX 7.2 python dnf - Exec format error

    Posted Fri October 21, 2022 07:14 AM
    Thank you Ayappan! I thought python3 is 32-bit and python3_64 is 64-bit.

    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------