Power

 View Only
  • 1.  DNF error in AIX 7.3

    Posted Mon September 02, 2024 03:29 AM

    Hi Team,

    Getting the below error while doing dnf installation.

    bash-5.2# dnf repolist
    Traceback (most recent call last):
      File "/opt/freeware/bin/dnf", line 58, 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/lib64/python3.9/site-packages/libdnf/__init__.py", line 3, in <module>
        from . import common_types
      File "/opt/freeware/lib64/python3.9/site-packages/libdnf/common_types.py", line 13, in <module>
        from . import _common_types
    ImportError:    0509-022 Cannot load module /opt/freeware/lib64/python3.9/site-packages/libdnf/_common_types.so.
            0509-150   Dependent module libgcc_s.a(shr.o) could not be loaded.
            0509-022 Cannot load module libgcc_s.a(shr.o).
            0509-026 System error: A file or directory in the path name does not exist.



    ------------------------------
    Subba Reddy Reddem
    ------------------------------


  • 2.  RE: DNF error in AIX 7.3

    Posted Tue September 03, 2024 03:21 AM

    Hi Team,

    Can anyone help on the above issue.



    ------------------------------
    Subba Reddy Reddem
    ------------------------------



  • 3.  RE: DNF error in AIX 7.3

    Posted Thu September 05, 2024 03:38 PM

    I'm getting a similar issue but it's importing a different library

     yum   
    Traceback (most recent call last):
      File "/usr/bin/yum", line 57, in <module>
        from dnf.cli import main
      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-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.

    Can someone at IBM please take a look?   I saw some older articles from maybe the guy updated rpm.rte and it didn't help me.  I also tryed to remove all the dmf and python3 packages and reinstalled and I still at the same place



    ------------------------------
    Vinny G
    ------------------------------



  • 4.  RE: DNF error in AIX 7.3

    Posted 29 days ago

    Vinny,

    In your case, it is likely you are pointing to the "wrong" libbz2.a file:

    # ls -l /opt/freeware/lib/libbz2*  /usr/opt/rpm/lib/libbz*
    -rw-r--r--    1 root     system       187977 Nov 28 2019  /opt/freeware/lib/libbz2.a
    -r-xr-xr-x    1 root     system       199139 Jul 04 2023  /usr/opt/rpm/lib/libbz2.a
    

    The file under /usr/opt/rpm/lib is installed through the rpm.rte fileset.

    The file under /opt/freeware/lib is likely installed by the bzip2 RPM installed on your system: bzip#-#.#.#.ppc

    The symbol that your command is complaining about IS NOT on the library from the rpm.rte fileset, but it IS included in the RPM:

    # nm  /usr/opt/rpm/lib/libbz2.a | grep _GLOBAL__AIXD_libbz2_so 
    
    # nm  /opt/freeware/lib/libbz2.a | grep _GLOBAL__AIXD_libbz2_so                          
    ._GLOBAL__AIXD_libbz2_so T   268436324
    _GLOBAL__AIXD_libbz2_so D   536877756
    _GLOBAL__AIXD_libbz2_so d   536877756          12
    
    


    You might be able to resolve your issue by adding /opt/freeware/lib to the LIBPATH or LD_LIBRARY_PATH in your environment.

    Please note that this is not likely the same issue that was reported in the original post by Subba Reddy



    ------------------------------
    Abraham Alvarez
    ------------------------------



  • 5.  RE: DNF error in AIX 7.3

    Posted 28 days ago

    Thank you, you pointed me in the right direction.  I was able to fix my issue. 

    The library on this system was a link, while the library on a working system was NOT a link.

    I moved the original file to libbz2.a-09132024 and copied the library from a working system at the same level.

    -rw-r--r--    1 root     system       187977 Sep 13 14:23 libbz2.a
    lrwxrwxrwx    1 root     system           25 Sep 05 09:34 libbz2.a-09132024 -> /usr/opt/rpm/lib/libbz2.a

    Here, I can see that the file belongs to bzip2-1.0.8-2.ppc.  When I did that to the link, it reported the same rpm.

     rpm -qf  /opt/freeware/lib/libbz2.a
    bzip2-1.0.8-2.ppc

    FYI, My LIBPATH or LD_LIBRARY_PATH are both blank. I had already tried to play with the LIBPATH, as I have another system with Oracle and Autosys, which mess me up DNF because they altered the LIBPATH for the system.  So I have to clear it before using DNF.

    I also noticed that I only libbz2.a files are only in /opt/freeware/lib.

     find /opt -name libbz2.a          
    /opt/freeware/lib/libbz2.a
    /opt/freeware/lib64/libbz2.a

    The DNF now works

    dnf --version
    4.2.17
      Installed: dnf-0:4.2.17-32_51.ppc at Thu Sep  5 16:22:45 EST 2024
      Built    :  at Fri Apr 28 12:17:59 EST 2023



    ------------------------------
    Vinny G
    ------------------------------



  • 6.  RE: DNF error in AIX 7.3

    Posted 21 days ago

    Hi Team,

    I am getting the below error while trying dnf can anyone help me to resolve the issue.

    bash-5.2# dnf repolist
    Traceback (most recent call last):
      File "/opt/freeware/bin/dnf", line 58, 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/lib64/python3.9/site-packages/libdnf/__init__.py", line 3, in <module>
        from . import common_types
      File "/opt/freeware/lib64/python3.9/site-packages/libdnf/common_types.py", line 13, in <module>
        from . import _common_types
    ImportError:    0509-022 Cannot load module /opt/freeware/lib64/python3.9/site-packages/libdnf/_common_types.so.
            0509-150   Dependent module libstdc++.a(libstdc++.so.6) could not be loaded.
            0509-022 Cannot load module libstdc++.a(libstdc++.so.6).
            0509-026 System error: A file or directory in the path name does not exist.
    bash-5.2#



    ------------------------------
    Subba Reddy Reddem
    ------------------------------



  • 7.  RE: DNF error in AIX 7.3

    Posted 16 days ago

    Hi Team,

    Can anyone help me with the above error.



    ------------------------------
    Subba Reddy Reddem
    ------------------------------