0

i am getting and error while extract rpm package which is below. I run this command many times before but this time it shows me an error. I try to run this command on Oracle Linux 7. What should i do ?

rpm2cpio couchbase-server-enterprise-6.5.0-oel7.x86_64.rpm | cpio --extract --make-directories --no-absolute-filenames

cpio: premature end of file
Romeo Ninov
  • 6,538
  • 1
  • 22
  • 31
Can
  • 39
  • 6
  • Try to download rpm file again – Romeo Ninov Feb 25 '20 at 08:50
  • yes, i did but nothing change – Can Feb 25 '20 at 09:21
  • Try first just to convert the file to cpio archive: `rpm2cpio couchbase-server-enterprise-6.5.0-oel7.x86_64.rpm >couchbase.cpio`, then check the list of files `cpio -t – Romeo Ninov Feb 25 '20 at 09:27
  • Script : Unpack rpm-package to a directory with package name : unPack_rpm.sh (534 B) https://drive.google.com/file/d/1q3d9QqrRhEThYByPDgWEaoxHnqWFWqfE/view?usp=sharing ... The classic unpack command is : `rpm2cpio [package.rpm] | cpio -idmv` – Knud Larsen Feb 25 '20 at 14:13
  • Does this answer your question? [Error while extracting file from RPM (rpm2cpio)](https://stackoverflow.com/questions/21875589/error-while-extracting-file-from-rpm-rpm2cpio) – Aaron D. Marasco Feb 26 '20 at 01:32
  • @AaronD.Marasco i check that post but didnt change anything. still same – Can Feb 26 '20 at 06:50
  • 1
    @RomeoNinov i run cpio -t – Can Feb 26 '20 at 06:54

1 Answers1

1

Ok. I solved it. when transfer the rpm file, some of the files can be missing. be sure your rpm file is not corrupt. try another way to tranfer the file. Thanks.

Can
  • 39
  • 6