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.  NEW INSTALL OF DNF

    Posted Fri December 22, 2023 03:17 PM

    Hello!

    I am installing DNF for the first time on both AIX 7.2 and AIX 7.3.  dnf_aixtoolbox.sh runs on both with no apparent errors and at the end returns the below:

    python3.9-librepo-1.11.0-32_2 will be installed
    rpm-python3-4.15.1-32_2 will be installed
    rpm-python3.9-4.15.1-32_2 will be installed
    zchunk-libs-1.1.4-32_2 will be installed

    Installing the packages...

    Verifying...                          ################################# [100%]
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:python3.9-3.9.16-0               ################################# [  3%]
       2:python3-3.9.16-0                 ################################# [  7%]
       3:libzstd-1.4.4-32_1               ################################# [ 10%]
       4:libmodulemd-1.5.2-32_2           ################################# [ 13%]
       5:libsolv-0.7.9-32_3               ################################# [ 17%]
       6:rpm-python3.9-4.15.1-32_2        ################################# [ 20%]
       7:libsmartcols-2.34-32_1           ################################# [ 23%]
       8:zchunk-libs-1.1.4-32_2           ################################# [ 27%]
       9:librepo-1.11.0-32_2              ################################# [ 30%]
      10:libdnf-0.39.1-32_3               ################################# [ 33%]
      11:python3.9-libdnf-0.39.1-32_3     ################################# [ 37%]
      12:python3.9-hawkey-0.39.1-32_3     ################################# [ 40%]
      13:python3.9-gpg-1.13.1-32_3        ################################# [ 43%]
      14:python3.9-librepo-1.11.0-32_2    ################################# [ 47%]
      15:p11-kit-0.23.22-0                ################################# [ 50%]
      16:p11-kit-tools-0.23.22-0          ################################# [ 53%]
      17:libcomps-0.1.15-32_1             ################################# [ 57%]
      18:python3.9-libcomps-0.1.15-32_1   ################################# [ 60%]
      19:dnf-data-4.2.17-32_4             ################################# [ 63%]
      20:python3.9-dnf-4.2.17-32_4        ################################# [ 67%]
      21:python3-dnf-4.2.17-32_4          ################################# [ 70%]
      22:dnf-4.2.17-32_4                  ################################# [ 73%]
      23:dnf-automatic-4.2.17-32_4        ################################# [ 77%]
      24:python3-libcomps-0.1.15-32_1     ################################# [ 80%]
      25:ca-certificates-2023.2.60-0      ################################# [ 83%]
      26:python3-librepo-1.11.0-32_2      ################################# [ 87%]
      27:python3-gpg-1.13.1-32_3          ################################# [ 90%]
      28:python3-hawkey-0.39.1-32_3       ################################# [ 93%]
      29:python3-libdnf-0.39.1-32_3       ################################# [ 97%]
      30:rpm-python3-4.15.1-32_2          ################################# [100%]

    dnf installed successfully.
    Please run 'dnf update' to update packages to the latest level.

    However, when I try running any dnf commands such as dnf update I get the following error on both servers I tried setting this up on:

    nferpddb->root:[/tmp/gcc_install]cd /opt/freeware/bin
    nferpddb->root:[/opt/freeware/bin]ls -l dnf
    lrwxrwxrwx    1 root     system            5 Dec 22 12:49 dnf -> dnf-3
    nferpddb->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 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/libdnf.a(libdnf.so.2).
            0509-150   Dependent module /opt/freeware/lib/libcrypto.a(libcrypto.so.1.1) could not be loaded.
            0509-152   Member libcrypto.so.1.1 is not found in archive
            0509-022 Cannot load module /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so.
            0509-150   Dependent module /opt/freeware/lib/libdnf.a(libdnf.so.2) could not be loaded.

    Odd that both systems return as a successful install but both spit out this error.  I am I running the correct script form /opt/freeware/bin?

    opt/freeware/bin/dnf update    ??????



    ------------------------------
    Gary Rafidi
    ------------------------------


  • 2.  RE: NEW INSTALL OF DNF

    Posted Fri December 22, 2023 03:45 PM

    Hi, Gary

    What is your oslevel -s?

    Is this output off 73? These are 32 bit files.

    Check the following... 

    • What's New in the AIX Toolbox for Open Source Software
      • https://www.ibm.com/support/pages/node/6833478
    06-Dec-2023 DNF(AIX 7.1 or 7.2)
    DNF steps are required for migration to AIX 7.3.

    Announced in Jan 2022, adding to What's New to build awareness.
    When DNF users migrate from 32 bit AIX 7.1 or 7.2 to 64 bit AIX 7.3 then the existing installed DNF won't work as-is. Some additional steps are required. AIX migration with DNF


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



  • 3.  RE: NEW INSTALL OF DNF

    Posted Fri December 22, 2023 03:54 PM

    Gary - one other thing...

    Check 'rpm -q openssl'

    It looks like you have a non-AIX openssl package installed in /opt/freeware/lib

    The AIX Toolbox packages are built against the AIX openssl.base file set libraries.

    On my 72 system:

    # ldd /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so | grep -i crypto
             /usr/lib/libcrypt.a(shr.o)
             /usr/lib/libcrypto.a(libcrypto.so.1.1)
             /opt/freeware/lib/libk5crypto.a(libk5crypto.so)
             /opt/freeware/lib/libk5crypto.so

    See the November 23 2023 section in What's New page:
    NOTE: You should remove any non-AIX openssl packages that deliver related libraries to /opt/freeware/lib. These files conflicts with rpm. These files have caused issues for some packages for some time, but certainly cause rpm failures now, due to missing libcrypto.so.3
    If you have non-AIX openssl packages installed, you can move this file out of the path, then use rpm -e to remove the package.

    mv /opt/freeware/lib/libcrypto.a /opt/freeware/lib/libcrypto.a.old
    rpm -qa | grep openssl
    rpm -e <the name of the package>





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



  • 4.  RE: NEW INSTALL OF DNF

    Posted Fri December 22, 2023 04:06 PM

    Hi Jan!

    Boy are you fast, AND Good!  I did have an ancient non AIX version of ssl installed on my AIX 7.2 System:

    nferpddb->root:[/tmp/gcc_install]rpm -q openssl
    openssl-0.9.7l-1.ppc

    I followed your instructions and it worked like a charm.  Thank you so much, and have a wonderful weekend!!

    nferpddb->root:[/opt/freeware/bin]./dnf repolist
    repo id                                                                                 repo name
    AIX_Toolbox                                                                             AIX generic repository
    AIX_Toolbox_72                                                                          AIX 7.2 specific repository
    AIX_Toolbox_noarch                                                                      AIX noarch repository
    nferpddb->root:[/opt/freeware/bin]



    ------------------------------
    Gary Rafidi
    ------------------------------