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.  ansible dnf module does not work

    Posted Tue April 04, 2023 08:28 AM

    When we try to run the ansible_builtin_dnf module we receive the following error:

    fatal: [d100siucsm02p1.d100.intern]: FAILED! => {"changed": false, "cmd": "dnf install -y python3-dnf", "msg": "Could not import the dnf python module using /usr/bin/python3 (3.7.15 (default, Dec 15 2022, 03:08:16) [GCC 8.3.0]). Please install `python3-dnf` package or ensure you have specified the correct ansible_python_interpreter.", "rc": 255, "results": [], "stderr": "exec(): 0509-036 Cannot load program /opt/freeware/bin/python3_32 because of the following errors:\n\t0509-130 Symbol resolution failed for /opt/freeware/lib/libpython3.7m.so because:\n\t0509-136 Symbol _GLOBAL__AIXI_libintl_so (number 6) is not exported from\n\t\t dependent module /usr/opt/rpm/lib/libintl.a(libintl.so.8).\n\t0509-136 Symbol _GLOBAL__AIXD_libintl_so (number 7) is not exported from\n\t\t dependent module /usr/opt/rpm/lib/libintl.a(libintl.so.8).\n\t0509-192 Examine .loader section symbols with the\n\t\t 'dump -Tv' command.\n", "stderr_lines": ["exec(): 0509-036 Cannot load program /opt/freeware/bin/python3_32 because of the following errors:", "\t0509-130 Symbol resolution failed for /opt/freeware/lib/libpython3.7m.so because:", "\t0509-136 Symbol _GLOBAL__AIXI_libintl_so (number 6) is not exported from", "\t\t dependent module /usr/opt/rpm/lib/libintl.a(libintl.so.8).", "\t0509-136 Symbol _GLOBAL__AIXD_libintl_so (number 7) is not exported from", "\t\t dependent module /usr/opt/rpm/lib/libintl.a(libintl.so.8).", "\t0509-192 Examine .loader section symbols with the", "\t\t 'dump -Tv' command."], "stdout": "", "stdout_lines": []}

    Our default python interpreter is python3_64

    When we set ansible_python_interpreter: "/opt/freeware/bin/python3_32" it works fine. 
    python shows the follwing problem:

    root@D100SIUCSM02 /root#  /opt/freeware/bin/python3_64

    Python 3.7.15 (default, Dec 15 2022, 03:08:16)

    [GCC 8.3.0] on aix7

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

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

    32bit works

    root@D100SIUCSM02 /root#  /opt/freeware/bin/python3_32

    Python 3.7.15 (default, Dec 15 2022, 03:25:12)

    [GCC 8.3.0] on aix7

    Type "help", "copyright", "credits" or "license" for more information.

    >>> import dnf

    >>>

    Any idea how to get this running with python_64?







    ------------------------------
    Carsten Stephan
    ------------------------------


  • 2.  RE: ansible dnf module does not work

    Posted Tue April 04, 2023 09:20 AM

    in AIX 7.1 & AIX 7.2, the dnf module is 32bit. So you have to use python3 32bit to load dnf module. 
    In AIX 7.3 , the dnf module is 64bit. So you can use python3 64bit to load it.



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



  • 3.  RE: ansible dnf module does not work

    Posted Wed April 05, 2023 05:42 AM
    Edited by Damien LEMAGNEN Wed April 05, 2023 05:49 AM

    Hi Stephan,

    I'm using AWX, in my ansible inventory I set ansible_python_interpreter: /opt/freeware/bin/python3_64 by default maybe like you.

    But in playbooks where I'm using ansinble.builtin.dnf module, I force ansible_python_interpreter: /opt/freeware/bin/python3_32

    By this way, it works.

    ------------------------------
    Damien LEMAGNEN
    AIX System Engineer/Architect
    NETIXWARE
    ------------------------------