Cyberithub

Solved: Curl error: Failed writing received data to disk/application on Linux

Advertisements

In this article, I will explain you about the curl error: Failed Writing received data to disk/application on Linux and the steps to solve this error. This error could show due to various reasons. One of the common reason is the disk space utilization which happened with me. I will take you through the detail explanation which I followed to solve this error. Hopefully the same will work for you as well.

Solved: Curl error: Failed writing received data to disk/application on Linux 2

Curl error: Failed writing received data to disk/application on Linux

Also Read: Best Steps to Install Java on RHEL 8/CentOS 8

Last night when i was trying to update my Server, I faced below curl error: Failed writing received data to disk/application on Linux. While looking into this error i thought to put the steps required to solve this issue in an article so that it might help you guys also in case you are also facing the same issue.

(207/285): libxml2-2.9.7-7.el8.x86_64.rpm 1.6 MB/s | 695 kB 00:00
(208/285): libxslt-1.1.32-4.el8.x86_64.rpm 820 kB/s | 249 kB 00:00
(209/285): lshw-B.02.18-23.el8.x86_64.rpm 786 kB/s | 322 kB 00:00
[MIRROR] linux-firmware-20191202-97.gite8a0f4c9.el8.noarch.rpm: Curl error (23): Failed writing received data to disk/application for http://centos.mirrors.estointernet.in/8.2.2004/BaseOS/x86_64/os/Packages/linux-firmware-20191202-97.gite8a0f4c9.el8.noarch.rpm [Failed writing body (4019 != 14280)]
[FAILED] linux-firmware-20191202-97.gite8a0f4c9.el8.noarch.rpm: Curl error (23): Failed writing received data to disk/application for http://centos.mirrors.estointernet.in/8.2.2004/BaseOS/x86_64/os/Packages/linux-firmware-20191202-97.gite8a0f4c9.el8.noarch.rpm [Failed writing body (4019 != 14280)]
(211-212/285): lvm2-2.03.08-3.el8.x86_64.rpm 67% [=========================================== ] 18 MB/s | 330 MB 00:08 ETA
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Error downloading packages:
Curl error (23): Failed writing received data to disk/application for http://centos.mirrors.estointernet.in/8.2.2004/BaseOS/x86_64/os/Packages/linux-firmware-20191202-97.gite8a0f4c9.el8.noarch.rpm [Failed writing body (4019 != 14280)]

NOTE:

Please note that here I am using root user to run all the below commands.You can use any user with sudo access to run all these commands. For more information Please check Step by Step: How to Add User to Sudoers to provide sudo access to the User.

When you encounter above error, the first thing you need to do is to clean up the cached packages by using dnf clean packages command as shown below.

[root@localhost ~]# dnf clean packages
209 files removed

Then you need to check the total disk usage to confirm you have enough space available to install all the updates in your Server. Check DNF Man Page to know more about DNF command.

[root@localhost ~]# df -h
Filesystem              Size Used  Avail Use% Mounted on
devtmpfs                396M   0   396M   0%    /dev
tmpfs                   411M   0   411M   0%   /dev/shm
tmpfs                   411M  5.6M 406M   2%    /run
tmpfs                   411M   0   411M   0%   /sys/fs/cgroup
/dev/mapper/centos-root 6.2G  5.2G  20M  100%     /
/dev/sda1               1014M 162M 853M   16%   /boot
tmpfs                    83M   0    83M    0%   /run/user/0

Here my root(/) partition showing 100% utilized so to install any further updates we need to free up some space. After freeing up sufficient space you can again try to run the update using same dnf update -y command as shown below. This time you will see update will be completed successfully.

[root@localhost ~]# dnf update -y
Last metadata expiration check: 3:21:00 ago on Thu 08 Oct 2020 02:32:00 PM EDT.
Dependencies resolved.
========================================================================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================================================================
Installing:
kernel-core x86_64 4.18.0-193.19.1.el8_2 BaseOS 28 M
Upgrading:
alsa-lib x86_64 1.2.1.2-3.el8 AppStream 441 k
bind-libs x86_64 32:9.11.13-6.el8_2.1 AppStream 172 k
bind-libs-lite x86_64 32:9.11.13-6.el8_2.1 AppStream 1.2 M
bind-license noarch 32:9.11.13-6.el8_2.1 AppStream 101 k
bind-utils x86_64 32:9.11.13-6.el8_2.1 AppStream 443 k
container-selinux noarch 2:2.124.0-1.module_el8.2.0+305+5e198a41 AppStream 47 k
containers-common x86_64 1:0.1.40-11.module_el8.2.0+377+92552693 AppStream 50 k
fribidi x86_64 1.0.4-8.el8 AppStream 89 k
fuse-overlayfs x86_64 0.7.2-5.module_el8.2.0+305+5e198a41 AppStream 60 k
git x86_64 2.18.4-2.el8_2 AppStream 186 k
git-core x86_64 2.18.4-2.el8_2 AppStream 4.0 M
git-core-doc noarch 2.18.4-2.el8_2 AppStream 2.3 M
httpd x86_64 2.4.37-21.module_el8.2.0+494+1df74eae AppStream 1.7 M

If you see the same error "Failed writing received data to disk/application on Linux" again then probably there is some issue with that specific package. So you might need to update that package manually by running dnf update curl -y command as in my case. You might get this error "Failed writing received data to disk/application on Linux" with some other package so you need to update that package first and then again run dnf update -y command to check if that solves your issue. Usually these steps are enough to solve this issue. If it still does not have any effect then you can write me in comment box to look into the issue further.

[root@localhost ~]# dnf update curl -y
CentOS-8 - AppStream 4.6 kB/s | 4.3 kB 00:00
CentOS-8 - Base 5.8 kB/s | 3.9 kB 00:00
CentOS-8 - Extras 1.5 kB/s | 1.5 kB 00:00
CentOS-8 - PowerTools 5.5 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 14 kB/s | 7.3 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 14 kB/s | 12 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 52 kB/s | 8.1 MB 02:39
Google Cloud SDK 250 B/s | 454 B 00:01
RPM Fusion for EL 8 - Free - Updates 5.1 kB/s | 3.7 kB 00:00
Dependencies resolved.
========================================================================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================================================================
Upgrading:
curl x86_64 7.61.1-12.el8 BaseOS 353 k
libcurl x86_64 7.61.1-12.el8 BaseOS 298 k

Transaction Summary
========================================================================================================================================================================
Upgrade 2 Packages

Total download size: 651 k

 

 

Popular Recommendations:-

How to Transfer Files to an AWS EC2 Instance Using WinSCP in 3 Easy Steps

Learn HTML Image Maps(v5) with Best Examples

Solved: nrpe.service: main process exited, code=exited, status=2/INVALIDARGUMENT

C# data types with Best Examples (.NET v4.7)

Learn HTML Tables(v5) with Best Examples

How to Install PHP on RedHat/CentOS 7 with Easy Steps

How to Install Ruby on Ubuntu 18.04 with Easy Steps

Easy Steps to Install GCC(C and C++ Compiler) on CentOS 7

Leave a Comment