[Solved]unpacking of archive failed: cpio: lstat failed – Not a directory

A strange CPIO error was reported when installing the RPM package on the company server today. (most errors can be solved by reinstalling CPIO or downloading RPM package again)

unpacking of archive failed: cpio: lstat failed - Not a directory

 

Solution:

After learning CPIO, I found a solution:

Step 1: check the directory required by the RPM package

 rpm2cpio XXXX.rpm | cpio -idmv

Step 2: check the corresponding directory, and you will find that it really exists, and it is not a directory…

Step 3: delete this directory and reinstall successfully!!!!

Reference: https://access.redhat.com/solutions/6189481

Read More: