Open Source Development

Power Open Source Development

Connect, learn, share, and engage with IBM Power.


#Power

 View Only
Expand all | Collapse all

Python packages installation error on AIX 7.2

  • 1.  Python packages installation error on AIX 7.2

    Posted 10 days ago

    Hi Team,

    We get the below error after aix toolbox installation for python on AIX 7.2.

    We tried unset the libpath but still we get the same error. please assist to fix it

    root@:/ # unset LIBPATH

    root@:/ # dnf update

    exec(): 0509-036 Cannot load program /opt/freeware/libexec/python3.9_32 because of the following errors:

    0509-130 Symbol resolution failed for /opt/freeware/lib/libpython3.9.a(libpython3.9.so) because:

    0509-136 Symbol _GLOBAL__AIXI_libintl_so (number 283) is not exported from

    dependent module /usr/opt/rpm/lib/libintl.a(libintl.so.8).

    0509-136 Symbol _GLOBAL__AIXD_libintl_so (number 284) is not exported from

    dependent module /usr/opt/rpm/lib/libintl.a(libintl.so.8).

    0509-192 Examine .loader section symbols with the

    'dump -Tv' command.

    root@:/ # echo $LIBPATH

    Regards,

    Ramkumar



    ------------------------------
    Ram Kumar
    ------------------------------

    #AIXOpenSource


  • 2.  RE: Python packages installation error on AIX 7.2

    Posted 10 days ago

    Hi Ram,

    You see the symbol _GLOBAL__AIXD_libintl_so is not exported from /usr/opt/rpm/lib/libintl.a(libintl.so.8).

    It is exported from /opt/freeware/lib/libintl.a.

    Do you have ls -l /opt/freeware/lib/libintl.a 
    -rw-r--r-- 1 root system 411692 Oct 20  2022 /opt/freeware/lib/libintl.a

    If you have check if that symbol exists.
    # dump -Tov -X64 /opt/freeware/lib/libintl.a | grep _GLOBAL__AIXI_libintl_so

    [68]    0x20001230    .data      EXP     DS   Ldef        [noIMid] _GLOBAL__AIXI_libintl_so

    You should see the above output. If you see the above output then 

    export LIBPATH=/opt/freeware/lib
    Then do dnf update

    After this you will no longer need to set LIBPATH, and dnf should work.



    ------------------------------
    Aditya Kamath
    ------------------------------



  • 3.  RE: Python packages installation error on AIX 7.2

    Posted 10 days ago

    Hi Adithya,

    We dont get the output for the dump command. please assist next steps 

    root@:/ # ls -l /opt/freeware/lib/libintl.a
    lrwxrwxrwx    1 root     system           26 Aug 26 12:19 /opt/freeware/lib/libintl.a -> /usr/opt/rpm/lib/libintl.a
    root@:/ # dump -Tov -X64 /opt/freeware/lib/libintl.a | grep _GLOBAL__AIXI_libintl_so
    root@:/ #

    Regards,

    Ramkumar



    ------------------------------
    Ram Kumar
    ------------------------------



  • 4.  RE: Python packages installation error on AIX 7.2

    Posted 10 days ago

    Hi Adithya,

    We removed the link and copied the libintl.a file from another working server. Then we exported LIBPATH and tried dnf update but still we get error. please assist

    root@:/ # dump -Tov -X64 /opt/freeware/lib/libintl.a | grep _GLOBAL__AIXI_libintl_so
    [68]    0x20001230    .data      EXP     DS   Ldef        [noIMid] _GLOBAL__AIXI_libintl_so

    root@:/ # export LIBPATH=/opt/freeware/lib

    root@:/ # dnf update
    Traceback (most recent call last):
      File "/opt/freeware/bin/dnf", line 57, in <module>
        from dnf.cli import main
      File "/opt/freeware/lib/python3.9/site-packages/dnf/__init__.py", line 30, 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 /usr/opt/rpm/lib/librpm.a(librpm.so.9).
            0509-150   Dependent module /usr/opt/rpm/lib/libintl.a(libintl.so.8) could not be loaded.
            0509-022 Cannot load module /usr/opt/rpm/lib/libintl.a(libintl.so.8).
            0509-026 System error: A file or directory in the path name does not exist.
            0509-022 Cannot load module /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so.
            0509-150   Dependent module /usr/opt/rpm/lib/librpm.a(librpm.so.9) could not be loaded.
    root@:/ #

    Regards,

    Ramkumar



    ------------------------------
    Ram Kumar
    ------------------------------



  • 5.  RE: Python packages installation error on AIX 7.2

    Posted 10 days ago

    Hi Ram,

    ImportError:    0509-022 Cannot load module /usr/opt/rpm/lib/librpm.a(librpm.so.9).
            0509-150   Dependent module /usr/opt/rpm/lib/libintl.a(libintl.so.8) could not be loaded.
            0509-022 Cannot load module /usr/opt/rpm/lib/libintl.a(libintl.so.8).
            0509-026 System error: A file or directory in the path name does not exist.

    Tentatively, can you copy from another LPAR this file /usr/opt/rpm/lib/libintl.a.
    It looks like this file is removed. 
    And then export LIBPATH=/opt/freeware/lib and try??



    ------------------------------
    Aditya Kamath
    ------------------------------



  • 6.  RE: Python packages installation error on AIX 7.2

    Posted 10 days ago

    Hi Aditya,

    We copied the libintl.a file from another server and tried but we get some error. please assist to fix it

    root@:/ # ls -ld /usr/opt/rpm/lib/libintl.a
    -r-xr-xr-x    1 root     system       452008 Jun 28 2022  /usr/opt/rpm/lib/libintl.a
    root@:/ #
    root@:/ # export LIBPATH=/opt/freeware/lib

    root@:/ # /opt/freeware/bin/dnf update
    Traceback (most recent call last):
      File "/opt/freeware/bin/dnf", line 57, in <module>
        from dnf.cli import main
      File "/opt/freeware/lib/python3.9/site-packages/dnf/__init__.py", line 30, 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-130 Symbol resolution failed for /opt/freeware/lib/libsolv.a(libsolv.so.1) because:
            0509-136   Symbol _GLOBAL__AIXI_libbz2_so (number 62) is not exported from
                       dependent module /usr/opt/rpm/lib/libbz2.a(libbz2.so.1).
            0509-136   Symbol _GLOBAL__AIXD_libbz2_so (number 63) is not exported from
                       dependent module /usr/opt/rpm/lib/libbz2.a(libbz2.so.1).
            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.
            0509-192 Examine .loader section symbols with the
                     'dump -Tv' command.

    Regards,

    Ramkumar



    ------------------------------
    Ram Kumar
    ------------------------------



  • 7.  RE: Python packages installation error on AIX 7.2

    Posted 9 days ago

    Hi Ram,

         Your system got messed up with the rpm dependency library and AIX toolbox libraries.

         I would suggest to cleanup the installed packages and make the setup again.
         Please follow the below link for the reference.

         https://community.ibm.com/community/user/blogs/jan-harris1/2022/05/25/destroyrpms


    Thanks, 



    ------------------------------
    Parth Patel
    ------------------------------



  • 8.  RE: Python packages installation error on AIX 7.2

    Posted 5 days ago

    Hi Patel,

    Thanks for update, i followed the steps as provided in the link     https://community.ibm.com/community/user/blogs/jan-harris1/2022/05/25/destroyrpms , destroyed all rpm's and installed dnf_aixtoolbox.sh again successfully, but still we receive below error during dnf update. please assist to fix it

    [SKIPPED] python3-libdnf-0.39.1-32_52.aix7.2.ppc.rpm: Already downloaded
    [SKIPPED] python3.9-dnf-4.2.17-32_53.aix7.2.ppc.rpm: Already downloaded
    [SKIPPED] python3.9-hawkey-0.39.1-32_52.aix7.2.ppc.rpm: Already downloaded
    [SKIPPED] python3.9-libdnf-0.39.1-32_52.aix7.2.ppc.rpm: Already downloaded
    (74/74): sqlite-3.50.4-1.aix7.1.ppc.rpm                                                                            3.6 MB/s | 9.9 MB     00:02
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                              2.2 MB/s | 9.9 MB     00:04
    warning: [fd 22]: Header V4 RSA/SHA256 Signature, key ID 41eea8e0: NOKEY
    AIX generic repository                                                                                             3.0 MB/s | 3.1 kB     00:00
    Traceback (most recent call last):
      File "/opt/freeware/bin/dnf", line 58, in <module>
        main.user_main(sys.argv[1:], exit_code=True)
      File "/opt/freeware/lib/python3.9/site-packages/dnf/cli/main.py", line 191, in user_main
        errcode = main(args)
      File "/opt/freeware/lib/python3.9/site-packages/dnf/cli/main.py", line 65, in main
        return _main(base, args, cli_class, option_parser_class)
      File "/opt/freeware/lib/python3.9/site-packages/dnf/cli/main.py", line 98, in _main
        return cli_run(cli, base)
      File "/opt/freeware/lib/python3.9/site-packages/dnf/cli/main.py", line 122, in cli_run
        ret = resolving(cli, base)
      File "/opt/freeware/lib/python3.9/site-packages/dnf/cli/main.py", line 166, in resolving
        base.do_transaction(display=displays)
      File "/opt/freeware/lib/python3.9/site-packages/dnf/cli/cli.py", line 235, in do_transaction
        self.gpgsigcheck(install_pkgs)
      File "/opt/freeware/lib/python3.9/site-packages/dnf/cli/cli.py", line 287, in gpgsigcheck
        self._get_key_for_package(po, fn)
      File "/opt/freeware/lib/python3.9/site-packages/dnf/base.py", line 2313, in _get_key_for_package
        keys = dnf.crypto.retrieve(keyurl, repo)
      File "/opt/freeware/lib/python3.9/site-packages/dnf/crypto.py", line 177, in retrieve
        keyinfos = rawkey2infos(handle)
      File "/opt/freeware/lib/python3.9/site-packages/dnf/crypto.py", line 158, in rawkey2infos
        with pubring_dir(pb_dir), Context() as ctx:
      File "/opt/freeware/lib/python3.9/site-packages/gpg/core.py", line 220, in __init__
        self.protocol = protocol
      File "/opt/freeware/lib/python3.9/site-packages/gpg/core.py", line 169, in __setattr__
        super(GpgmeWrapper, self).__setattr__(key, value)
      File "/opt/freeware/lib/python3.9/site-packages/gpg/core.py", line 1123, in protocol
        errorcheck(gpgme.gpgme_engine_check_version(value))
      File "/opt/freeware/lib/python3.9/site-packages/gpg/errors.py", line 129, in errorcheck
        raise GPGMEError(retval, extradata)
    gpg.errors.GPGMEError: GPGME: Invalid crypto engine

    Regards,

    Ramkumar



    ------------------------------
    Ram Kumar
    ------------------------------



  • 9.  RE: Python packages installation error on AIX 7.2

    Posted 4 days ago

    Hi Ram,

    Can you try export PATH=/opt/freeware/bin:$PATH and then try again??



    ------------------------------
    Aditya Kamath
    ------------------------------



  • 10.  RE: Python packages installation error on AIX 7.2

    Posted 3 days ago

    Hi Adithya,

    Thanks for your support, it is working now.

    please assist steps to make it permanent export PATH=$PATH:/opt/freeware/bin

    Regards,

    Ramkumar



    ------------------------------
    Ram Kumar
    ------------------------------



  • 11.  RE: Python packages installation error on AIX 7.2

    Posted 3 days ago

    Hi Ram,

    In your .profile file in root 

    Check for the PATH variable.

    PATH=.:$PATH:/opt/IBM/sdk_rust/0.0.8/bin/:/usr/lpp/htx/etc/scripts:/test/tools:/opt/freeware/bin

    It should look like this. There you can append the paths you want.



    ------------------------------
    Aditya Kamath
    ------------------------------



  • 12.  RE: Python packages installation error on AIX 7.2

    Posted 3 days ago

    Hi Adithya,

    Thanks for quick update, we could see this under. profile. shall we append it after bin?

    #The following line is added by License Use Management installation
    export PATH=$PATH:/usr/opt/ifor/ls/os/aix/bin
    #The following line is added by License Use Management installation
    export PATH=$PATH:/opt/LicenseUseManagement/bin

    Regards,

    Ramkumar



    ------------------------------
    Ram Kumar
    ------------------------------



  • 13.  RE: Python packages installation error on AIX 7.2

    Posted 2 days ago

    Sure.



    ------------------------------
    Aditya Kamath
    ------------------------------