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
Expand all | Collapse all

dnf update failed with Curl error

  • 1.  dnf update failed with Curl error

    Posted Thu September 22, 2022 06:53 PM
    Hi, 
    I tried to update dnf but it failed with below error. Earlier dnf install with script completed fine.

    Total download size: 96 M
    Is this ok [y/N]: y
    Downloading Packages:
    [SKIPPED] bash-5.1.4-2.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] bzip2-1.0.8-2.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] check-0.13.0-1.aix7.1.ppc.rpm: Already downloaded
    [SKIPPED] curl-7.83.1-1.aix7.1.ppc.rpm: Already downloaded
    [SKIPPED] cyrus-sasl-2.1.28-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] db-5.3.28-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] expat-2.4.6-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] gdbm-1.23-1.aix7.1.ppc.rpm: Already downloaded
    [SKIPPED] gettext-0.21-1.aix7.1.ppc.rpm: Already downloaded
    [SKIPPED] glib2-2.56.1-3.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] gmp-6.2.1-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] gnupg2-2.2.35-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] gnutls-3.7.1-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] gpgme-1.13.1-100.aix7.1.ppc.rpm: Already downloaded
    [SKIPPED] info-6.7-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] json-c-0.15-2.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] krb5-libs-1.18.5-1.aix7.1.ppc.rpm: Already downloaded
    [SKIPPED] libassuan-2.5.5-1.aix7.1.ppc.rpm: Already downloaded
    [SKIPPED] libffi-3.4.2-1.aix7.1.ppc.rpm: Already downloaded
    [SKIPPED] libgcrypt-1.9.4-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] libgpg-error-1.42-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] libiconv-1.17-1.aix7.1.ppc.rpm: Already downloaded
    [SKIPPED] libksba-1.4.0-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] libnghttp2-1.46.0-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] libssh2-1.10.0-1.aix7.1.ppc.rpm: Already downloaded
    [SKIPPED] libtasn1-4.16.0-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] libtextstyle-0.21-1.aix7.1.ppc.rpm: Already downloaded
    [SKIPPED] libunistring-0.9.10-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] libyaml-0.2.5-1.aix7.1.ppc.rpm: Already downloaded
    [SKIPPED] nettle-3.7.3-1.aix6.1.ppc.rpm: Already downloaded
    [SKIPPED] libgcc-8-1.aix7.2.ppc.rpm: Already downloaded
    [SKIPPED] libgcc8-8.3.0-6.aix7.2.ppc.rpm: Already downloaded
    [SKIPPED] libstdcplusplus-8-1.aix7.2.ppc.rpm: Already downloaded
    (34/66): npth-1.5-1.aix6.1.ppc.rpm 627 kB/s | 220 kB 00:00
    [MIRROR] ncurses-6.3-1.aix7.1.ppc.rpm: Curl error (23): Failed writing received data to disk/application for anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/ncurses/ncurses-6.3-1.aix7.1.ppc.rpm">https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/ncurses/ncurses-6.3-1.aix7.1.ppc.rpm [Failure writing output to destination]
    [FAILED] ncurses-6.3-1.aix7.1.ppc.rpm: Curl error (23): Failed writing received data to disk/application for anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/ncurses/ncurses-6.3-1.aix7.1.ppc.rpm">https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/ncurses/ncurses-6.3-1.aix7.1.ppc.rpm [Failure writing output to destination]
    (36-37/66): libxml2-2.9.14-1.aix6.1.ppc.rpm 55% [======================================= ] 2.9 MB/s | 109 MB 00:30 ETA
    Error: Error downloading packages:
    Curl error (23): Failed writing received data to disk/application for anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/ncurses/ncurses-6.3-1.aix7.1.ppc.rpm">https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/ncurses/ncurses-6.3-1.aix7.1.ppc.rpm [Failure writing output to destination]



    hdapchdr01cls2:/# rpm -qa |sort
    AIX-rpm-7.2.5.103-2.ppc
    ca-certificates-2020.06.01-0.ppc
    dnf-4.2.17-32_2.noarch
    dnf-automatic-4.2.17-32_2.noarch
    dnf-data-4.2.17-32_2.noarch
    libcomps-0.1.11-32_1.ppc
    libdnf-0.39.1-32_2.ppc
    libmodulemd-1.5.2-32_2.ppc
    librepo-1.11.0-32_1.ppc
    libsmartcols-2.34-32_1.ppc
    libsolv-0.7.9-32_1.ppc
    libzstd-1.4.4-32_1.ppc
    p11-kit-0.23.16-0.ppc
    p11-kit-tools-0.23.16-0.ppc
    python3-3.7.9-0.ppc
    python3-dnf-4.2.17-32_2.noarch
    python3-gpgme-1.13.1-32_1.ppc
    python3-hawkey-0.39.1-32_2.ppc
    python3-libcomps-0.1.11-32_1.ppc
    python3-libdnf-0.39.1-32_2.ppc
    python3-librepo-1.11.0-32_1.ppc
    rpm-python3-4.15.1-32_1.ppc
    yum-4.2.17-32_2.noarch
    zchunk-libs-1.1.4-32_1.ppc

    Let me know how to fix it.

    ------------------------------
    Harley AIX
    ------------------------------


  • 2.  RE: dnf update failed with Curl error

    Posted Thu September 22, 2022 08:13 PM
    Did you fill up the destination file system?

    -- 
    Stephen L. Ulmer
    Enterprise Architect
    Mainline Information Systems






  • 3.  RE: dnf update failed with Curl error

    Posted Fri September 23, 2022 12:07 PM
    Hi, 
    No, we have enough space in destination filesystem.

    hdapchdr01cls2:/ # df -g /opt
    Filesystem GB blocks Free %Used Iused %Iused Mounted on
    /dev/hd10opt 2.06 1.67 20% 7230 2% /opt
    hdapchdr01cls2:/ #

    ------------------------------
    Harley AIX
    ------------------------------



  • 4.  RE: dnf update failed with Curl error

    Posted Fri September 23, 2022 12:44 PM
    I meant the cache to where things are downloaded. Everything is downloaded ahead of time before the transaction is started.

    -- 
    Stephen L. Ulmer
    Enterprise Architect
    Mainline Information Systems
    (m) 352-870-8649






  • 5.  RE: dnf update failed with Curl error

    Posted Fri September 23, 2022 01:10 PM
    Hi, 
    I saw /var is almost full. so add some spaces to /var, and after dnf update completed fine.
    Not sure the above curl errors is coming for that or not.
    Thanks,

    ------------------------------
    Harley AIX
    ------------------------------



  • 6.  RE: dnf update failed with Curl error

    Posted Sat September 24, 2022 08:55 AM
    Yes, this error occurs when there is not enough space in /var for the download.

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



  • 7.  RE: dnf update failed with Curl error

    Posted Wed September 28, 2022 06:29 PM
    Hi, 
    This is clone box, to setup dnf. 
    So I followed below link, to wipe out all rpm then install rpm.rte, then run dnf install script and dnf update.

    https://community.ibm.com/community/user/power/blogs/jan-harris1/2022/05/25/destroyrpms?CommunityKey=10c1d831-47ee-4d92-a138-b03f7896f7c9

    So after I ran dnf installation script, it completed successfully, but dnf update failed with below error. 

    hdaptgrcdb01:/ # dnf update
    Traceback (most recent call last):
    File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
    File "/opt/freeware/lib/python3.7/site-packages/dnf/__init__.py", line 32, in <module>
    import dnf.base
    File "/opt/freeware/lib/python3.7/site-packages/dnf/base.py", line 29, in <module>
    import libdnf.transaction
    File "/opt/freeware/lib/python3.7/site-packages/libdnf/__init__.py", line 3, in <module>
    from . import common_types
    File "/opt/freeware/lib/python3.7/site-packages/libdnf/common_types.py", line 13, in <module>
    from . import _common_types
    ImportError: Could not load module /opt/freeware/lib/librepo.a(librepo.so.0).
    Dependent module /opt/freeware/lib/libcrypto.a(libcrypto.so.1.0.2) could not be loaded.
    Member libcrypto.so.1.0.2 is not found in archive
    Could not load module /opt/freeware/lib/python3.7/site-packages/libdnf/_common_types.so.
    Dependent module /opt/freeware/lib/librepo.a(librepo.so.0) could not be loaded.

    hdaptgrcdb01:/ # unset LIBPATH
    hdaptgrcdb01:/ # echo $LIBPATH

    hdaptgrcdb01:/ #

    hdaptgrcdb01:/ # echo $PATH
    /usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14_64/jre/bin:/usr/java14_64/bin:/usr/local/bin:/usr/local/sysadmin/bin:/usr/local/sysadmin/perftools/nmon/NMON12:/opt/csm/bin:/usr/sbin:/usr/bin:usr/local/bin:/opt/LicenseUseManagement/bin:/usr/opt/ifor/ls/os/aix/bin


    hdaptgrcdb01:/depot/dnf-20220619 # rpm -qa |sort
    AIX-rpm-7.2.5.103-1.ppc
    ca-certificates-2020.06.01-0.ppc
    dnf-4.2.17-32_2.noarch
    dnf-automatic-4.2.17-32_2.noarch
    dnf-data-4.2.17-32_2.noarch
    libcomps-0.1.11-32_1.ppc
    libdnf-0.39.1-32_2.ppc
    libmodulemd-1.5.2-32_2.ppc
    librepo-1.11.0-32_1.ppc
    libsmartcols-2.34-32_1.ppc
    libsolv-0.7.9-32_1.ppc
    libzstd-1.4.4-32_1.ppc
    p11-kit-0.23.16-0.ppc
    p11-kit-tools-0.23.16-0.ppc
    python3-3.7.9-0.ppc
    python3-dnf-4.2.17-32_2.noarch
    python3-gpgme-1.13.1-32_1.ppc
    python3-hawkey-0.39.1-32_2.ppc
    python3-libcomps-0.1.11-32_1.ppc
    python3-libdnf-0.39.1-32_2.ppc
    python3-librepo-1.11.0-32_1.ppc
    rpm-python3-4.15.1-32_1.ppc
    zchunk-libs-1.1.4-32_1.ppc


    hdaptgrcdb01:/ # df -g /var
    Filesystem GB blocks Free %Used Iused %Iused Mounted on
    /dev/hd9var 2.62 1.39 47% 7800 3% /var
    hdaptgrcdb01:/ # df -g /tmp
    Filesystem GB blocks Free %Used Iused %Iused Mounted on
    /dev/hd3 10.00 3.97 61% 5668 1% /tmp
    hdaptgrcdb01:/ # df -g /opt
    Filesystem GB blocks Free %Used Iused %Iused Mounted on
    /dev/hd10opt 2.00 1.23 39% 11979 4% /opt
    hdaptgrcdb01:/ #


    As I said, we wiped out all rpm with the destroyRPMS script. Not sure why dnf update failed with error.

    Let me know how to fix it.

    ------------------------------
    Harley AIX
    ------------------------------



  • 8.  RE: dnf update failed with Curl error

    Posted Thu September 29, 2022 09:45 AM

    Hello @Harley AIX !

    From your error message I´m looking for the two .a files on my AIX 7.2.5.4 system:

    ​[USER@SERVER:/SCRIPTS/ANSIBLE/AIX]# rpm -q --whatprovides /opt/freeware/lib/librepo.a
    librepo-1.11.0-100.ppc
    [USER@SERVER:/SCRIPTS/ANSIBLE/AIX]# rpm -q --whatprovides /opt/freeware/lib/libcrypto.a
    error: file /opt/freeware/lib/libcrypto.a: No such file or directory

    It seems that you have a different version of librepo installed then me and but more important --> is openssl installed?

    # lslpp -L *openssl*
    Fileset Level State Type Description (Uninstaller)
    ----------------------------------------------------------------------------
    openssl.base 1.1.1.1201 C F Open Secure Socket Layer

    # lslpp -f openssl.base|grep libcrypt
    /usr/lib/libcrypto.a.min
    /usr/lib/libcrypto_compat.a
    /usr/lib/pkgconfig/libcrypto.pc
    /usr/lib/libcrypto.a

    # ar -t /usr/lib/libcrypto.a
    libcrypto.so
    libcrypto.so.0.9.8
    libcrypto.so.1.0.0
    libcrypto.so.1.0.2
    libcrypto.so.1.1

    So the dependent module of librepo.a is provided by openssl, did you install it from MRS?

    HTH,

    Ciao,

    Steve



    ------------------------------
    Stephan Dietl
    ------------------------------



  • 9.  RE: dnf update failed with Curl error

    Posted Thu September 29, 2022 11:52 AM
    Hi,
    hdaptgrcdb01:/ # dnf update
    Traceback (most recent call last):
    File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
    File "/opt/freeware/lib/python3.7/site-packages/dnf/__init__.py", line 32, in <module>
    import dnf.base
    File "/opt/freeware/lib/python3.7/site-packages/dnf/base.py", line 29, in <module>
    import libdnf.transaction
    File "/opt/freeware/lib/python3.7/site-packages/libdnf/__init__.py", line 3, in <module>
    from . import common_types
    File "/opt/freeware/lib/python3.7/site-packages/libdnf/common_types.py", line 13, in <module>
    from . import _common_types
    ImportError: Could not load module /opt/freeware/lib/librepo.a(librepo.so.0).
    Dependent module /opt/freeware/lib/libcrypto.a(libcrypto.so.1.0.2) could not be loaded.
    Member libcrypto.so.1.0.2 is not found in archive
    Could not load module /opt/freeware/lib/python3.7/site-packages/libdnf/_common_types.so.
    Dependent module /opt/freeware/lib/librepo.a(librepo.so.0) could not be loaded.
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ # rpm -q --whatprovides /opt/freeware/lib/librepo.a
    librepo-1.11.0-32_1.ppc
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ # rpm -q --whatprovides /opt/freeware/lib/libcrypto.a
    file /opt/freeware/lib/libcrypto.a is not owned by any package
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ # lslpp -L *openssl*
    Fileset Level State Type Description (Uninstaller)
    ----------------------------------------------------------------------------
    openssl.base 1.1.1.1200 C F Open Secure Socket Layer


    State codes:
    A -- Applied.
    B -- Broken.
    C -- Committed.
    E -- EFIX Locked.
    O -- Obsolete. (partially migrated to newer version)
    ? -- Inconsistent State...Run lppchk -v.

    Type codes:
    F -- Installp Fileset
    P -- Product
    C -- Component
    T -- Feature
    R -- RPM Package
    E -- Interim Fix
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ # lslpp -f openssl.base|grep libcrypt
    /usr/lib/libcrypto_compat.a
    /usr/lib/libcrypto.a
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ # ar -t /usr/lib/libcrypto.a
    libcrypto.so
    libcrypto.so.0.9.8
    libcrypto.so.1.0.0
    libcrypto.so.1.0.2
    libcrypto.so.1.1
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #
    hdaptgrcdb01:/ #


    Let me know how to fix.

    Thanks,

    ------------------------------
    Harley AIX
    ------------------------------



  • 10.  RE: dnf update failed with Curl error

    Posted Fri September 30, 2022 02:15 AM
    Hi,
    As per above output, I moved /opt/freeware/lib/libcrypto.a. Then dnf update ran successfully.
    Thanks, for all your help.



    ------------------------------
    Harley AIX
    ------------------------------



  • 11.  RE: dnf update failed with Curl error

    Posted Fri September 30, 2022 03:29 AM
    Hello @Harley AIX !

    Yes, moving the file ​/opt/freeware/lib/libcrypto.a is a workaround, but I find it rather strange that:

    hdaptgrcdb01:/ # rpm -q --whatprovides /opt/freeware/lib/libcrypto.a
    file /opt/freeware/lib/libcrypto.a is not owned by any package

    Did you install it manually or what does "lslpp -w /opt/freeware/lib/libcrypto.a" show? Where is that file from?


    I´m interested in the root cause of this,

    HTH,

    Ciao,

    Steve

    ------------------------------
    Stephan Dietl
    ------------------------------



  • 12.  RE: dnf update failed with Curl error

    Posted Fri September 30, 2022 10:17 AM
    Hi, 
    No. as I said earlier, I wiped out all rpm with the destroyRPM script, the downloaded and installed fresh aix rpm.rte. Then run ./install_dnf.sh -d.
    Which completed successfully and showing below rpm installed for the first time. 
    hdaptgrcdb01:/depot/dnf-20220619 # rpm -qa |sort
    AIX-rpm-7.2.5.103-1.ppc
    ca-certificates-2020.06.01-0.ppc
    dnf-4.2.17-32_2.noarch
    dnf-automatic-4.2.17-32_2.noarch
    dnf-data-4.2.17-32_2.noarch
    libcomps-0.1.11-32_1.ppc
    libdnf-0.39.1-32_2.ppc
    libmodulemd-1.5.2-32_2.ppc
    librepo-1.11.0-32_1.ppc
    libsmartcols-2.34-32_1.ppc
    libsolv-0.7.9-32_1.ppc
    libzstd-1.4.4-32_1.ppc
    p11-kit-0.23.16-0.ppc
    p11-kit-tools-0.23.16-0.ppc
    python3-3.7.9-0.ppc
    python3-dnf-4.2.17-32_2.noarch
    python3-gpgme-1.13.1-32_1.ppc
    python3-hawkey-0.39.1-32_2.ppc
    python3-libcomps-0.1.11-32_1.ppc
    python3-libdnf-0.39.1-32_2.ppc
    python3-librepo-1.11.0-32_1.ppc
    rpm-python3-4.15.1-32_1.ppc
    zchunk-libs-1.1.4-32_1.ppc

    Then when I ran, dnf update that failed with all those errors earlier I specified.
    As per your queries, 
    Did you install it manually or what does "lslpp -w /opt/freeware/lib/libcrypto.a" show? Where is that file from?
    -No manual installation. Not sure where it come from. One more thing, after I moved the libcrypto.a, dnf upgrade failed again with /opt/freeware/lib/libssl.a error as similar as libcrypto.a. So I checked as per your command again and moved from the way. Then dnf updated ran fine.

    hdaptgrcdb01:/ # rpm -q --whatprovides /opt/freeware/lib/libssl.a
    file /opt/freeware/lib/libssl.a is not owned by any package

    Thanks,





    ------------------------------
    Harley AIX
    ------------------------------



  • 13.  RE: dnf update failed with Curl error

    Posted Mon October 03, 2022 12:34 PM
    Hello @Harley AIX !

    > "-No manual installation. Not sure where it come from. "

    This puzzles me and would instigate an investigation. 

    Does "lslpp -f /opt/freeware/lib/libssl.a" also show nothing?

    An installer from a proprietary programm that just places its files there?


    With kind regards,

    Stephan Dietl



    ------------------------------
    Stephan Dietl
    ------------------------------



  • 14.  RE: dnf update failed with Curl error

    Posted Mon October 03, 2022 01:48 PM
    Do you still have /opt/freeware/lib/libssl.a or /opt/freeware/lib/libcrypto.a in your system? 
    These files are not provided by any AIX toolbox or AIX packages. 
    These are the files those are creating issues. When AIX toolbox package trying to find libcrypto.a it finds in /opt/freeware/lib path first.
    But this is not the one it is looking for and hence it fails. You should not have these files in your system.
    If you have removed all the RPMs but still these libraries are there then there is some issue. 
    Either they were copied manually or the package that installed them did not remove it. 

    I would recommend following.
    1. If there are /opt/freeware/lib/libssl.a or /opt/freeware/lib/libcrypto.a files then remove them.
    2. Run 'updtvpkg' command.
    3. Try dnf again.


    ------------------------------
    SANKET RATHI
    ------------------------------