RPM : package installation Error : cpio: read failed

The Problem

We can see the following error while unpacking a package using rpm command;

---
Preparing... ##################################################
dbaastools ##################################################
error: unpacking of archive failed on file /var/opt/xxxx/xxx/xxx/xxx/xxx.o.zip.xxxxx: cpio: read failed - Inappropriate ioctl for device

How to correct this issue and to install the package successfully.

The Solution

RPM uses cpio as it’s archive format. This is the reason why we’re seeing a cpio error here. The “cpio: read failed” error means that the package you are trying to unpack is either corrupt or incomplete.

If you see this error, please make sure that the package has been downloaded from a reliable source and it is complete by checking the MD5 checksum of the downloaded copy and the original. (Command #md5sum)

Check the size and md5sum of the RPM copy on your system.

# ls -l [rpm]
# md5sum [rpm]

If there is a difference in the checksum, it is recommended to do a fresh download from a reliable source. If the server has direct internet access or access via Proxy, download the package file directly to the server using the wget command.

# wget [URL]

The [URL] should be replaced by the actual download URL.

Related Post