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.  libdnf exec format error. 64 bit version?

    Posted Fri July 14, 2023 02:05 PM

    I'm attempting to use the python dnf module (from ansible) but it fails to load with the Exec format error.  It looks like the libdnf package provided by toolbox has 32 bit libraries while the python 3.9 interpreter is 64 bit.  what is the best way to fix this?

    # dnf info libdnf
    Last metadata expiration check: 0:46:41 ago on Fri Jul 14 13:16:39 2023.
    Installed Packages
    Name         : libdnf
    Version      : 0.39.1
    Release      : 32_52
    Architecture : ppc
    Size         : 12 M
    Source       : libdnf-0.39.1-32_52.src.rpm
    Repository   : @System
    From repo    : AIX_Toolbox_72
    Summary      : Library providing simplified C and Python API to libsolv
    URL          : https://github.com/rpm-software-management/libdnf
    License      : LGPLv2+, Public Domain
    Description  : A Library providing simplified C and Python API to libsolv.

    # python
    Python 3.9.16 (main, Apr  5 2023, 02:48:48) 
    [GCC 10.3.0] on aix
    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.9/site-packages/dnf/__init__.py", line 32, in <module>
        import dnf.base
      File "/opt/freeware/lib/python3.9/site-packages/dnf/base.py", line 29, in <module>
        import libdnf.transaction
      File "/opt/freeware/lib/python3.9/site-packages/libdnf/__init__.py", line 3, in <module>
        from . import common_types
      File "/opt/freeware/lib/python3.9/site-packages/libdnf/common_types.py", line 13, in <module>
        from . import _common_types
    ImportError: Could not load module /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so.
    System error: Exec format error



  • 2.  RE: libdnf exec format error. 64 bit version?

    Posted Mon July 17, 2023 02:26 AM

    Use 32bit python "/opt/freeware/libexec/python3.9_32" to import the dnf modules. 



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



  • 3.  RE: libdnf exec format error. 64 bit version?

    Posted Mon July 17, 2023 10:21 PM
    Edited by Vasiliy Gokoyev Mon July 17, 2023 10:21 PM

    it looks like the 32 bit python has moved as it used to be in /opt/freeware/bin.

    Any plans to make a 64 bit python-dnf package?  the system python is 64 bit now and it's cumbersome to juggle python_interpreter variable in playbooks just to be able to use the ansible dnf module.   thanks