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.  Broken package in AIX 7.2

    Posted Mon January 22, 2024 04:30 AM
    Edited by Robert Kampermann Fri January 26, 2024 04:30 AM

    Problem is solved.

    I installed dnf from the toolbox image availible on ESS (ESD-Toolbox_for_Linux_Apps_Common_7.1-7.3_112023_LKT010326.tar.gz)

    on a lpar running AIX 7200-05-05-2246

    Goal is to install packages with ansible using dnf.

    That fails with a fatal error:

    fatal: [lpar23-7255]: FAILED! => {"changed": false, "msg": "`python3-dnf` is not installed, but it is requiredfor the Ansible dnf module.", "results": []}

    the package python-dnf 3 is installed: 

    #rpm -qa | grep python3-dnf

    python3-dnf-4.2.17-32_51.ppc

    If we want to import the dnf module into python3 we get an error:

    #/opt/freeware/bin/python3

    Python 3.9.18 (main, Sep 19 2023, 04:57:07)

    [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:    0509-022 Cannot load module /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so.

            0509-026 System error: Cannot run a file that does not have a valid format.

    The .so-file got delivered from the following package:

    # rpm -qf /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so

    python3.9-libdnf-0.39.1-32_52.ppc

    What is wrong there?

    We have a lpar installed with 7300-02-01-2346 and the same toolbox image from above and it works fine, only difference, it is using python3.9-libdnf-0.39.1-64_52.ppc



    ------------------------------
    Robert Kampermann
    ------------------------------


    #AIXOpenSource


  • 2.  RE: Broken package in AIX 7.2

    Posted Tue January 23, 2024 08:09 AM

    Hi Robert,

    For AIX 7.2 supported version of dnf is 32-bit  and for 7.3 it is 64-bit version.

    The command /opt/freeware/bin/python3 is 64-bit and dnf installed is 32-bit.

    To import 32-bit dnf you should be using /opt/freeware/libexec/python3.9_32.

    Similarly ansible should be using the right interpreter. 



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



  • 3.  RE: Broken package in AIX 7.2

    Posted Fri April 26, 2024 04:37 AM

    Hey Sangamesh,

    Been using DNF for a while on AIX 7.3 all good.  Had a requirement to get in on 7.2 so downloaded the tar did the install but getting this,

    ImportError:    0509-022 Cannot load module /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so.
            0509-026 System error: Cannot run a file that does not have a valid format.

    orchid{IBM,8284-22A}# cat dnf-3
    #!/opt/freeware/libexec/python3.9_32

    Please advise how to get this to run :-)

    Thanks,

    Brad



    ------------------------------
    Bradley Wells
    ------------------------------



  • 4.  RE: Broken package in AIX 7.2

    Posted Mon April 29, 2024 06:41 AM
    Edited by Bradley Wells Mon April 29, 2024 07:42 AM

    ------------------------------
    Bradley Wells