AIX

 View Only
  • 1.  python can not import dnf on AIX7.2 with python3.9

    Posted Thu January 25, 2024 05:45 AM

    I did a fresh install of dnf on a AIX7.2 with no rpms installed with the latest dnf_bundle_aix_71_72_v7.tar.

    when i do:

    opt/freeware/etc/dnf# python3

    Python 3.9.16 (main, Jun 28 2023, 12:45:03)

    [GCC 8.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.

    >>>

    i get this error. 

    These packages are installed 

    python3.9-3.9.16-0.ppc

    libzstd-1.4.4-32_1.ppc

    libsolv-0.7.9-32_3.ppc

    libsmartcols-2.34-32_1.ppc

    librepo-1.11.0-32_2.ppc

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

    python3.9-gpg-1.13.1-32_3.ppc

    p11-kit-0.23.22-0.ppc

    libcomps-0.1.15-32_1.ppc

    dnf-data-4.2.17-32_4.noarch

    python3-dnf-4.2.17-32_4.noarch

    dnf-automatic-4.2.17-32_4.noarch

    ca-certificates-2023.2.60-0.ppc

    python3-gpg-1.13.1-32_3.ppc

    python3-libdnf-0.39.1-32_3.ppc

    AIX-rpm-7.2.5.201-1.ppc

    python3-3.9.16-0.ppc

    libmodulemd-1.5.2-32_2.ppc

    rpm-python3.9-4.15.1-32_2.ppc

    zchunk-libs-1.1.4-32_2.ppc

    libdnf-0.39.1-32_3.ppc

    python3.9-hawkey-0.39.1-32_3.ppc

    python3.9-librepo-1.11.0-32_2.ppc

    p11-kit-tools-0.23.22-0.ppc

    python3.9-libcomps-0.1.15-32_1.ppc

    python3.9-dnf-4.2.17-32_4.noarch

    dnf-4.2.17-32_4.noarch

    python3-libcomps-0.1.15-32_1.ppc

    python3-librepo-1.11.0-32_2.ppc

    python3-hawkey-0.39.1-32_3.ppc

    rpm-python3-4.15.1-32_2.ppc



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


  • 2.  RE: python can not import dnf on AIX7.2 with python3.9

    Posted Thu January 25, 2024 05:59 AM

    rpm fileset itself is 32bit in AIX 7.1 & 7.2. So the dependent dnf is also 32bit. ( In AIX 7.3, rpm is 64bit. So is dnf). 
    The default python3 is 64bit. So one should use "/opt/freeware/libexec/python3.9_32" for importing the dnf module. 



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



  • 3.  RE: python can not import dnf on AIX7.2 with python3.9

    Posted Fri January 26, 2024 02:39 AM

    Thanks. This works quite well now. 
    I guess the reason why there is no python3.9_32 in /opt/freeware/bin is to reach the highest possible confusion ;-).



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