'gzip decompression failed' and 'tar: Error exit delayed from previous errors'

11,001

Solution 1

The file is corrupted. You need to try to get a good copy from wherever it came from, or if it was corrupted when created, you need to get it regenerated from the images. The problem has nothing to do with the .png files. The problem is that the .tar.gz is corrupted.

(By the way "unzip" is the wrong verb here, since it is not a zip file. "extract" would be the correct verb.)

Solution 2

The problem lies in the fact that Mac OS uses bsdtar. When I have a similar problem, I installed gnutar (most Linux systems use ).

brew install gnu-tar
gtar -ztvf archive.tar.gz
Share:
11,001
Tozz
Author by

Tozz

I like to watch my Roomba vacuum cleaning the rooms

Updated on July 09, 2022

Comments

  • Tozz
    Tozz almost 2 years

    Mac OS

    I have a file, images.tar.gz. , which contains about 7000 .png images. I need to unzip this file.

    But when I use terminal to unzip it

    tar zxvf /Users/JourneyWoo/images_002.tar.gz

    I always encounter this problem

    ... ...   
    x images/00003910_000.png
    x images/00001934_002.png
    x images/00002250_001.png: gzip decompression failed
    tar: Error exit delayed from previous errors.
    

    In this way, I cannot get the whole dataset in this .tar.gz file due to the break. I also used chmod u+r /Users/JourneyWoo/images_002.tar.gz, but it did not work.

    Maybe the problem about one of the png images in this .tar.gz file? How can I deal with this problem? REALLY THANKS!

  • Tozz
    Tozz over 6 years
    Thanks for your suggestions!
  • Mark Adler
    Mark Adler almost 6 years
    Irrelevant. Whatever tar was being used has no problem with the tar file format, since many files are properly extracted. The problem, as stated explicitly in the error message, is that the gzip file is corrupted.