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.  DNF stopped working after updating the rpm.rte and running dnf update.

    Posted Wed July 05, 2023 02:08 PM

    We update rpm.rte to rpm.rte.4.15.1.2009

    ran updtvpkg

    then ran dnf update. 

    the updates all appeared to work without issue but now when i try to run dnf i am getting the following:

    [root@aixsbx1][/]dnf
    Traceback (most recent call last):
      File "/usr/bin/dnf", line 58, in <module>
        from dnf.cli import main
    ModuleNotFoundError: No module named 'dnf'
    [root@aixsbx1][/]



    ------------------------------
    Ken Foster
    ------------------------------


  • 2.  RE: DNF stopped working after updating the rpm.rte and running dnf update.

    Posted Fri July 07, 2023 04:32 AM
    Edited by SANGAMESH MALLAYYA Fri July 07, 2023 04:32 AM

    Hi Ken,

    Can you run "/opt/freeware/bin/dnf" and check ?

    Now we aren't shipping /usr/bin/dnf and i don't know if it was created manually.

    If this was present with previous install of dnf and then update will remove it automatically. 

    But if somehow it was copied manually then it will still be present.

    Since /usr/bin/dnf i guess was mostly based python3-3.7.x and after DNF update it will be  based on python3.9.

    Hence the /usr/bin/dnf command won't find anything and your PATH is set to /usr/bin first than the /opt/freeware/bin



    ------------------------------
    SANGAMESH
    ------------------------------



  • 3.  RE: DNF stopped working after updating the rpm.rte and running dnf update.

    Posted Fri July 07, 2023 01:38 PM

    Thank you for the reply.

    /usr/bin/dnf is a symlink that was created as part of our previous dnf install/upgrades.

    Here is what i see when running /opt/freeware/bin/dnf

    [root@aixsbx1][/]/opt/freeware/bin/dnf
    Traceback (most recent call last):
      File "/opt/freeware/bin/dnf", line 58, in <module>
        from dnf.cli import main
    ModuleNotFoundError: No module named 'dnf'
    [root@aixsbx1][/]ls -lrt /opt/freeware/bin/dnf
    lrwxrwxrwx    1 root     system            5 Jul  5 10:44 /opt/freeware/bin/dnf -> dnf-3
    [root@aixsbx1][/]ls -lrt /opt/freeware/bin/dnf*
    -rwxr-xr-x    1 root     system         1288 Apr 26 2022  /opt/freeware/bin/dnf-automatic
    -rwxr-xr-x    1 root     system         2020 Apr 26 2022  /opt/freeware/bin/dnf-3
    lrwxrwxrwx    1 root     system            5 Jul  5 10:44 /opt/freeware/bin/dnf -> dnf-3
    [root@aixsbx1][/]



    ------------------------------
    Ken Foster
    ------------------------------



  • 4.  RE: DNF stopped working after updating the rpm.rte and running dnf update.

    Posted Sat July 08, 2023 05:25 AM

    Hi Ken,

    Please provide the output of .

    rpm -qa 

    rpm -Va

    head /opt/freeware/bin/dnf

    /opt/freeware/bin/python3.9 -c 'import dnf'

    ls -l /opt/freeware/bin/python*



    ------------------------------
    SANGAMESH
    ------------------------------



  • 5.  RE: DNF stopped working after updating the rpm.rte and running dnf update.

    Posted Mon July 10, 2023 08:58 AM

    Here is the output you requested.  

    [root@aixsbx1][/]rpm -qa
    sudo-1.6.9p15-2noldap.ppc
    yum-metadata-parser-1.1.4-2.ppc
    python-singledispatch-3.4.0.3-1.noarch
    python-cherrypy-10.2.0-1.noarch
    python-six-1.10.0-1.noarch
    python-msgpack-0.4.8-1.ppc
    python-jinja2-2.10.1-1.noarch
    python-backports_abc-0.5-1.noarch
    python-pip-10.0.1-1.noarch
    libgcc-10-2.ppc
    libstdc++-10-2.ppc
    ncurses-6.3-1.ppc
    xz-libs-5.2.5-1.ppc
    python3-tornado-4.5.3-1.ppc
    zeromq-devel-4.3.4-1.ppc
    rpm-python3-4.15.1-64_2.ppc
    expect-5.45.4-2.ppc
    AIX-rpm-7.3.0.2-28.ppc
    libffi-3.4.2-1.ppc
    expat-2.5.0-1.ppc
    libtasn1-4.16.0-1.ppc
    check-0.13.0-1.ppc
    gmp-6.2.1-1.ppc
    libgomp-10-2.ppc
    pcre-8.44-2.ppc
    libunistring-0.9.10-1.ppc
    libtextstyle-0.21-2.ppc
    libiconv-1.17-1.ppc
    info-7.0.2-1.ppc
    sqlite-3.41.2-1.ppc
    gdbm-1.23-1.ppc
    python3-3.9.16-2.ppc
    python3.7-3.7.16-1.ppc
    python3.9-markupsafe-1.1.1-2.ppc
    python3.9-jinja2-2.10.3-2.noarch
    python3.9-charset-normalizer-2.0.12-2.noarch
    python3.9-idna-2.8-2.noarch
    python3.9-requests-2.27.1-2.noarch
    python3.9-psutil-5.9.0-2.ppc
    python3.9-pyyaml-5.4.1.1-2.ppc
    libassuan-2.5.5-1.ppc
    p11-kit-0.23.22-1.ppc
    ca-certificates-2023.2.60-2.ppc
    python3-urllib3-1.26.7-2.noarch
    python3-charset-normalizer-2.0.12-2.noarch
    python3.9-dateutil-2.8.0-2.noarch
    python3.9-chardet-3.0.4-2.noarch
    salt-3004.2-2.noarch
    gnutls-3.7.2-1.ppc
    popt-1.18-1.ppc
    python3.9-libcomps-0.1.15-101.ppc
    cyrus-sasl-2.1.28-1.ppc
    libssh2-1.10.0-2.ppc
    npth-1.5-1.ppc
    curl-8.0.1-1.ppc
    libsolv-0.7.9-64_50.ppc
    gpgme-1.13.1-101.ppc
    libdnf-0.39.1-64_51.ppc
    python3-hawkey-0.39.1-64_51.ppc
    python3-gpg-1.13.1-101.ppc
    dnf-4.2.17-64_51.ppc
    dnf-automatic-4.2.17-64_51.ppc
    python-pycurl-7.43.0.5-1.ppc
    salt-minion-3004.2-2.noarch
    python3-requests-2.27.1-2.noarch
    python3-pyyaml-5.4.1.1-2.ppc
    python3-psutil-5.9.0-2.ppc
    python3-distro-1.5.0-2.noarch
    python3-markupsafe-1.1.1-2.ppc
    pysqlite-2.8.3-2.ppc
    python-tools-2.7.18-4.ppc
    python-iniparse-0.4-1.noarch
    python-urlgrabber-3.10.1-1.noarch
    prngd-0.9.29-1.ppc
    python-markupsafe-1.0-1.ppc
    python-pycrypto-2.6.1-1.ppc
    python-futures-3.0.5-1.noarch
    python-PyYAML-3.11-1.ppc
    python-setuptools-0.9.8-2.noarch
    python-pytest-3.1.3-1.noarch
    python-babel-0.9.6-1.noarch
    python-requests-2.4.3-1.noarch
    python-tornado-4.5.1-1.ppc
    libgcc10-10.3.0-6.ppc
    libstdc++10-10.3.0-6.ppc
    zeromq-4.3.4-1.ppc
    bzip2-1.0.8-2.ppc
    python-pyzmq-16.0.2-2.ppc
    tcl-8.6.11-1.ppc
    zlib-1.2.13-1.ppc
    libzstd-1.5.2-2.ppc
    db-5.3.28-1.ppc
    json-c-0.15-2.ppc
    libyaml-0.2.5-1.ppc
    libgomp10-10.3.0-6.ppc
    readline-8.2-1.ppc
    libxml2-2.10.3-2.ppc
    glib2-2.72.1-1.ppc
    bash-5.1.16-1.ppc
    gettext-0.21-2.ppc
    libgpg-error-1.45-1.ppc
    libmodulemd-1.5.2-100.ppc
    python3.9-3.9.16-2.ppc
    python-2.7.18-4.ppc
    python3.9-six-1.13.0-2.noarch
    libsmartcols-2.34-101.ppc
    python3.9-certifi-2019.9.11-2.noarch
    python3.9-distro-1.5.0-2.noarch
    python3.9-urllib3-1.26.7-2.noarch
    python3.9-msgpack-0.6.2-2.ppc
    python3.9-pycryptodomex-3.10.1-2.ppc
    python3.9-pyzmq-21.0.2-1.ppc
    libgcrypt-1.9.4-1.ppc
    p11-kit-tools-0.23.22-1.ppc
    libksba-1.6.2-1.ppc
    python3-idna-2.8-2.noarch
    python3-certifi-2019.9.11-2.noarch
    python3-dateutil-2.8.0-2.noarch
    python3.9-tornado-6.0.3-2.ppc
    nettle-3.7.3-1.ppc
    krb5-libs-1.20.1-1.ppc
    libcomps-0.1.15-101.ppc
    python3-libcomps-0.1.15-101.ppc
    openldap-2.5.12-1.ppc
    dnf-data-4.2.17-64_51.ppc
    libnghttp2-1.46.0-1.ppc
    zchunk-libs-1.1.4-103.ppc
    gnupg2-2.2.35-1.ppc
    librepo-1.11.0-101.ppc
    python3-libdnf-0.39.1-64_51.ppc
    python3.9-gpg-1.13.1-101.ppc
    python3-dnf-4.2.17-64_51.ppc
    python3-dnf-plugins-core-4.0.16-64_51.ppc
    python3-dnf-plugin-versionlock-4.0.16-64_51.ppc
    python3-librepo-1.11.0-101.ppc
    logrotate-3.20.1-1.ppc
    python3-chardet-3.0.4-2.noarch
    python3-pyzmq-21.0.2-1.ppc
    python3-pycryptodomex-3.10.1-2.ppc
    python3-msgpack-0.6.2-2.ppc
    python3-jinja2-2.10.3-2.noarch
    python3-six-1.13.0-2.noarch
    python-devel-2.7.18-4.ppc
    [root@aixsbx1][/]rpm -Va
    S.5....T.    /etc/sudoers
    S.5....T.    /opt/freeware/bin/pip
    Unsatisfied dependencies for libgcc-1:10-2.ppc:
            AIX-rpm < 7.3.0.0 is needed by (installed) libgcc-1:10-2.ppc
    Unsatisfied dependencies for libstdc++-1:10-2.ppc:
            AIX-rpm < 7.3.0.0 is needed by (installed) libstdc++-1:10-2.ppc
    S.5....T.    /opt/freeware/lib/libiconv.a
    .M.......  g /opt/freeware/etc/ssl/certs/extracted/java/cacerts
    .M.......  g /opt/freeware/etc/ssl/certs/extracted/openssl/ca-bundle.trust.crt
    .M.......  g /opt/freeware/etc/ssl/certs/extracted/pem/email-ca-bundle.pem
    .M.......  g /opt/freeware/etc/ssl/certs/extracted/pem/objsign-ca-bundle.pem
    .M.......  g /opt/freeware/etc/ssl/certs/extracted/pem/tls-ca-bundle.pem
    S.5....T.  c /opt/freeware/etc/salt/minion
    .......T.  c /etc/prngd.conf
    Unsatisfied dependencies for libgcc10-10.3.0-6.ppc:
            AIX-rpm < 7.3.0.0 is needed by (installed) libgcc10-10.3.0-6.ppc
    Unsatisfied dependencies for libstdc++10-10.3.0-6.ppc:
            AIX-rpm < 7.3.0.0 is needed by (installed) libstdc++10-10.3.0-6.ppc
    S.5....T.    /opt/freeware/lib/libgssapi_krb5.a
    S.5....T.    /opt/freeware/lib/libgssrpc.a
    S.5....T.    /opt/freeware/lib/libkadm5clnt_mit.a
    S.5....T.    /opt/freeware/lib/libkdb5.a
    S.5....T.    /opt/freeware/lib/libkrb5.a
    S.5....T.  c /opt/freeware/etc/dnf/dnf.conf
    .M.......  g /var/lib/dnf
    .M.......  g /var/log/dnf.librepo.log
    .M.......  g /var/log/hawkey.log
    S.5....T.  c /opt/freeware/etc/dnf/plugins/versionlock.list
    [root@aixsbx1][/]head /opt/freeware/bin/dnf
    #!/opt/freeware/bin/python3
    # The dnf executable script.
    #
    # Copyright (C) 2012-2016 Red Hat, Inc.
    #
    # This copyrighted material is made available to anyone wishing to use,
    # modify, copy, or redistribute it subject to the terms and conditions of
    # the GNU General Public License v.2, or (at your option) any later version.
    # This program is distributed in the hope that it will be useful, but WITHOUT
    # ANY WARRANTY expressed or implied, including the implied warranties of
    [root@aixsbx1][/]/opt/freeware/bin/python3.9 -c 'import dnf'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'dnf'
    [root@aixsbx1][/]ls -l /opt/freeware/bin/python*
    lrwxrwxrwx    1 root     system            7 Jul  5 10:43 /opt/freeware/bin/python -> python2
    lrwxrwxrwx    1 root     system           14 Jul  5 10:43 /opt/freeware/bin/python-config -> python2-config
    lrwxrwxrwx    1 root     system            9 Jul  5 10:43 /opt/freeware/bin/python2 -> python2.7
    lrwxrwxrwx    1 root     system           16 Jul  5 10:43 /opt/freeware/bin/python2-config -> python2.7-config
    -rwxr-xr-x    1 root     system       170357 Dec 15 2022  /opt/freeware/bin/python2.7
    -rwxr-xr-x    1 root     system         1690 Dec 15 2022  /opt/freeware/bin/python2.7-config
    -rwxr-xr-x    1 root     system       173308 Dec 15 2022  /opt/freeware/bin/python2.7_64
    -rw-r--r--    1 root     system         1693 Dec 15 2022  /opt/freeware/bin/python2.7_64-config
    lrwxrwxrwx    1 root     system           12 Jul  5 10:43 /opt/freeware/bin/python2_64 -> python2.7_64
    lrwxrwxrwx    1 root     system           19 Jul  5 10:43 /opt/freeware/bin/python2_64-config -> python2.7_64-config
    lrwxrwxrwx    1 root     system            9 Jul  5 10:43 /opt/freeware/bin/python3 -> python3.9
    lrwxrwxrwx    1 root     system           12 Jul  5 10:43 /opt/freeware/bin/python3.7 -> python3.7_64
    lrwxrwxrwx    1 root     system           19 Jul  5 10:43 /opt/freeware/bin/python3.7-config -> python3.7-config_64
    lrwxrwxrwx    1 root     system           20 Jul  5 10:43 /opt/freeware/bin/python3.7-config_32 -> python3.7m-config_32
    lrwxrwxrwx    1 root     system           20 Jul  5 10:43 /opt/freeware/bin/python3.7-config_64 -> python3.7m-config_64
    lrwxrwxrwx    1 root     system           13 Jul  5 10:43 /opt/freeware/bin/python3.7_32 -> python3.7m_32
    lrwxrwxrwx    1 root     system           13 Jul  5 10:43 /opt/freeware/bin/python3.7_64 -> python3.7m_64
    lrwxrwxrwx    1 root     system           13 Jul  5 10:43 /opt/freeware/bin/python3.7m -> python3.7m_64
    lrwxrwxrwx    1 root     system           20 Jul  5 10:43 /opt/freeware/bin/python3.7m-config -> python3.7m-config_64
    -rwxr-xr-x    1 root     system         3015 Mar 15 09:42 /opt/freeware/bin/python3.7m-config_32
    -rwxr-xr-x    1 root     system         2992 Mar 15 09:41 /opt/freeware/bin/python3.7m-config_64
    -rwxr-xr-x    1 root     system       297420 Mar 15 09:41 /opt/freeware/bin/python3.7m_32
    -rwxr-xr-x    1 root     system       308842 Mar 15 09:40 /opt/freeware/bin/python3.7m_64
    -rwxr-xr-x    1 root     system       189356 Apr  5 02:59 /opt/freeware/bin/python3.9
    lrwxrwxrwx    1 root     system           10 Jul  5 10:43 /opt/freeware/bin/python_64 -> python2_64
    lrwxrwxrwx    1 root     system           17 Jul  5 10:43 /opt/freeware/bin/python_64-config -> python2_64-config



    ------------------------------
    Ken Foster
    ------------------------------



  • 6.  RE: DNF stopped working after updating the rpm.rte and running dnf update.

    Posted Tue July 11, 2023 01:33 AM

    Hi Ken,

    Looks like somehow the update didn't happen correctly.

    I don't see any of the python3.9 DNF packages but python3.9 in the list you provided.

    Not sure if you had anything in the versionlock plugin which caused this issue. 

    One option is to try these steps.

    rpm -e libcomps python3.9-libcomps python3-libcomps python3-dnf dnf dnf-automatic dnf-data libdnf python3-hawkey python3-libdnf librepo python3-librepo python3.9-librepo python3-dnf-plugins-core python3-dnf-plugin-versionlock dnf-plugins-core

    run the dnf_aixtoolbox.sh script and run "dnf update"



    ------------------------------
    SANGAMESH
    ------------------------------



  • 7.  RE: DNF stopped working after updating the rpm.rte and running dnf update.

    Posted Tue July 11, 2023 08:26 AM

    Thank you for all of the assistance and feedback.  I will attempt this as well as refresh our sandbox and start the upgrade process from scratch to see if I can determine where the issue is.



    ------------------------------
    Ken Foster
    ------------------------------



  • 8.  RE: DNF stopped working after updating the rpm.rte and running dnf update.

    Posted Tue July 11, 2023 08:38 AM

    Cleaning up the files and rerunning the install using the dnf_aixtoolbox.sh got dnf working again.  

    Thanks again for all the help.



    ------------------------------
    Ken Foster
    ------------------------------



  • 9.  RE: DNF stopped working after updating the rpm.rte and running dnf update.

    Posted Sun February 09, 2025 03:07 PM

    Hi Ken

    Thank you for your insights

    Kindly could you please explain the steps you took to achieve the following

    Cleaning up the files and rerunning the install using the dnf_aixtoolbox.sh got dnf working again. 

    Thanks

    Sabri



    ------------------------------
    Sabrina Ibrahim
    ------------------------------