Power

 View Only
  • 1.  DNF update error on AIX

    Posted Fri July 05, 2024 01:46 AM

    Hi Team,

    We get the below error while dnf update on AIX 7.2, please assist to fix it

     # /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 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: Symbol resolution failed for /opt/freeware/lib/libsolv.a(libsolv.so.1) because:
            Symbol _GLOBAL__AIXI_libbz2_so (number 62) is not exported from dependent
              module /usr/opt/rpm/lib/libbz2.a(libbz2.so.1).
            Symbol _GLOBAL__AIXD_libbz2_so (number 63) is not exported from dependent
              module /usr/opt/rpm/lib/libbz2.a(libbz2.so.1).
    Could not load module /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so.
    System error: Exec format error
    Examine .loader section symbols with the 'dump -Tv' command.

    Regards,

    Ramkumar



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


  • 2.  RE: DNF update error on AIX

    Posted Tue July 09, 2024 10:50 AM

    I do not know why /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so is loading /usr/opt/rpm/lib.

    # echo $LIBPATH
    

    This should be empty.

    If this is empty, then you need to check your other packages.

    For example, I have the following:

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

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

    The search path looks in /opt/freeware/lib first.

    # dump -Hv /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so | grep ":"
    

    0 /opt/freeware/lib:/usr/opt/rpm/lib:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8/pthread:/opt/freeware/lib/pthread:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8:/usr/lib:/lib

    I have the required symbols:

    # dump -Tv /opt/freeware/lib/libbz2.a | grep _GLOBAL__AIXD_libbz2_so
    

    [22] 0x20001abc .data EXP DS Ldef [noIMid] _GLOBAL__AIXD_libbz2_so

    # rpm -qf /opt/freeware/lib/libbz2.a
    

    bzip2-1.0.8-2.ppc



    ------------------------------
    Jan Harris
    AIX Development Support (Liaison to the AIX Toolbox for Open Source)
    IBM (Contract)
    Austin
    ------------------------------



  • 3.  RE: DNF update error on AIX

    Posted Tue July 09, 2024 12:45 PM
    Hi Harris,
     
    Thanks for update, please find the below updates
     
    Checked and made the LIBPATH null
    output before change
     # echo $LIBPATH
    /opt/CA/SharedComponents/Csam/SockAdapter/lib:/opt/CA/SharedComponents/Csam/SockAdapter/lib64:/opt/CA/SharedComponents/Csam/SockAdapter/lib:/opt/CA/SharedComponents/Csam/SockAdapter/lib64:/opt/CA/SharedComponents/lib:/opt/CA/CAlib
     
    executed to make null
    # export LIBPATH=
     
    After the change
    #  echo $LIBPATH
     
     
     # rpm -qf /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so
    python3.9-libdnf-0.39.1-32_52.ppc
     
     # dump -Hv /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so | grep ":"
    /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so:
    0      /opt/freeware/lib:/usr/opt/rpm/lib:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8/pthread:/opt/freeware/lib/pthread:/opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/8:/usr/lib:/lib
     
    No output for the below command
    # dump -Tv /opt/freeware/lib/libbz2.a | grep _GLOBAL__AIXD_libbz2_so
     
    # rpm -qf /opt/freeware/lib/libbz2.a
    bzip2-1.0.8-2.ppc
    Regards,
    Ramkumar


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



  • 4.  RE: DNF update error on AIX

    Posted Tue July 09, 2024 01:42 PM

    OK so first, you need to make sure you do NOT have LIBPATH set for your AIX Toolbox environment.

    Next, as we saw with libiconv.a it looks like something has overwritten  /opt/freeware/lib/libbz2.a

    Check:

    ls -al  /opt/freeware/lib/libbz2.a

    dump -Hv  /opt/freeware/lib/libbz2.a

    rpm -qi bzip2-1.0.8-2.ppc

    rpm -Va bzip2-1.0.8-2.ppc

    You can try to overwrite the package. Since DNF will not run, you would have to use rpm.

    So download this:

    https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/bzip2/bzip2-1.0.8-2.aix6.1.ppc.rpm

    The reinstall:

     rpm -Uvh --force bzip2-1.0.8-2.aix6.1.ppc.rpm

    It seems that someone has been manually changing files, most likely on an error-by-error basis. If reinstalling bzip fixes one error, but then you see different load errors, I recommend that you start over again with your Open Source environment. 

    Here is a blog entry I wrote up to help, as "last resort" when users have ongoing issues due to custom file and package manipulations.

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



    ------------------------------
    Jan Harris
    AIX Development Support (Liaison to the AIX Toolbox for Open Source)
    IBM (Contract)
    Austin
    ------------------------------



  • 5.  RE: DNF update error on AIX

    Posted Wed July 10, 2024 12:37 AM
    Hi Harris,
     
    Thanks for your great support, please find the command output
     
     # ls -al  /opt/freeware/lib/libbz2.a
    -rw-r--r--    1 root     system       187977 Nov 28 2019  /opt/freeware/lib/libbz2.a
     
     # dump -Hv  /opt/freeware/lib/libbz2.a
     
    /opt/freeware/lib/libbz2.a[libbz2.so.1]:
     
                            ***Loader Section***
                          Loader Header Information
    VERSION#         #SYMtableENT     #RELOCent        LENidSTR
    0x00000001       0x00000038       0x0000008c       0x00000042
     
    #IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
    0x00000003       0x00000bf0       0x000002f8       0x00000c32
     
     
                            ***Import File Strings***
    INDEX  PATH                          BASE                MEMBER
    0      /opt/freeware/lib:/usr/lib:/lib
    1                                    libgcc_s.a          shr.o
    2                                    libc.a              shr.o
     
     # rpm -qi bzip2-1.0.8-2.ppc
    Name        : bzip2
    Version     : 1.0.8
    Release     : 2
    Architecture: ppc
    Install Date: Wed Jul 10 02:03:35 2024
    Group       : Applications/File
    Size        : 604150
    License     : BSD
    Signature   : (none)
    Source RPM  : bzip2-1.0.8-2.src.rpm
    Build Date  : Thu Nov 28 23:57:13 2019
    Build Host  : pokndd10.pok.stglabs.ibm.com
    URL         : http://www.bzip.org/
    Summary     : A file compression utility
    Description :
    Bzip2 is a freely available, patent-free, high quality data compressor.
    Bzip2 compresses files to within 10 to 15 percent of the capabilities
    of the best techniques available.  However, bzip2 has the added benefit
    of being approximately two times faster at compression and six times
    faster at decompression than those techniques.  Bzip2 is not the
    fastest compression utility, but it does strike a balance between speed
    and compression capability.
     
    Install bzip2 if you need a compression utility.
     
    The library is available as 32-bit and 64-bit.
     
     # rpm -Va bzip2-1.0.8-2.ppc
     
     # rpm -Uvh --force bzip2-1.0.8-2.aix6.1.ppc.rpm
    Verifying...                          ################################# [100%]
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:bzip2-1.0.8-2                    ################################# [ 50%]
    Cleaning up / removing...
       2:bzip2-1.0.8-2                    ################################# [100%]
     
     
     # /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 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: Symbol resolution failed for /opt/freeware/lib/libdnf.a(libdnf.so.2) because:
            Symbol _GLOBAL__AIXI_libsqlite3_so (number 593) is not exported from dependent
              module /opt/freeware/lib/libsqlite3.a(libsqlite3.so.0).
            Symbol _GLOBAL__AIXD_libsqlite3_so (number 594) is not exported from dependent
              module /opt/freeware/lib/libsqlite3.a(libsqlite3.so.0).
    Symbol resolution failed for /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so because:
            Symbol _GLOBAL__AIXI_libsqlite3_so (number 183) is not exported from dependent
              module /opt/freeware/lib/libsqlite3.a(libsqlite3.so.0).
            Symbol _GLOBAL__AIXD_libsqlite3_so (number 184) is not exported from dependent
              module /opt/freeware/lib/libsqlite3.a(libsqlite3.so.0).
    Examine .loader section symbols with the 'dump -Tv' command.
     
     
    Shall i proceed to remove all rpms and reinstall again as per link provided by you?
     
    https://community.ibm.com/community/user/power/blogs/jan-harris1/2022/05/25/destroyrpms


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



  • 6.  RE: DNF update error on AIX

    Posted Thu July 11, 2024 12:44 PM

    Hi Harris/Team,

    please update your findings on shared output

    Regards,

    Ramkumar



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



  • 7.  RE: DNF update error on AIX

    Posted Fri July 12, 2024 10:47 AM

    You probably need to reinstall sqlite. But as I already explained in the previous note:

    It seems that someone has been manually changing files, most likely on an error-by-error basis. If reinstalling bzip fixes one error, but then you see different load errors, I recommend that you start over again with your Open Source environment. 



    ------------------------------
    Jan Harris
    AIX Development Support (Liaison to the AIX Toolbox for Open Source)
    IBM (Contract)
    Austin
    ------------------------------



  • 8.  RE: DNF update error on AIX

    Posted Wed July 17, 2024 11:15 AM

    Hi Harris,

    Thanks for your great support.

    dnf update error fixed now by reinstalling sqlite, but unable to install ninja. shall we start over again by remove all rpm's and fresh onstallation

    # pip3 install --user ninja
    ERROR: Exception:
    Traceback (most recent call last):
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
        status = run_func(*args)
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
        return func(self, options, args)
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 324, in run
        session = self.get_default_session(options)
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 95, in get_default_session
        self._session = self.enter_context(self._build_session(options))
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 122, in _build_session
        session = PipSession(
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 342, in __init__
        self.headers["User-Agent"] = user_agent()
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 175, in user_agent
        setuptools_dist = get_default_environment().get_distribution("setuptools")
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_internal/metadata/__init__.py", line 76, in get_default_environment
        return select_backend().Environment.default()
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_internal/metadata/__init__.py", line 64, in select_backend
        from . import pkg_resources
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_internal/metadata/pkg_resources.py", line 8, in <module>
        from pip._vendor import pkg_resources
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3328, in <module>
        def _initialize_master_working_set():
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3302, in _call_aside
        f(*args, **kwargs)
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3340, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 622, in _build_master
        ws = cls()
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 615, in __init__
        self.add_entry(entry)
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 671, in add_entry
        for dist in find_distributions(entry, True):
      File "/home/autox/.local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2134, in find_on_path
        for dist in factory(fullpath):

    Regards,

    Ramkumar



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