4

I have downloaded a compressed file from http://ds.arm.com/downloads/. File details are DS500-BN-00019-r5p0-21rel1.tgz(64 bit) When I try to extract this file using the following command

tar -zxvf DS500-BN-00019-r5p0-21rel1.tgz

I receive the following error

gzip: stdin: invalid compressed data--crc error
tar: Child returned status 1
tar: Error is not recoverable: exiting now

The same output I got if I try to view contents using "-tzf" option. In different ubuntu environment file extracts successfully. tar is failing to extract only in my ubuntu environment. If I use 7z, I observe the following failure message

7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_IN,Utf16=on,HugeFiles=on,4 CPUs)
Processing archive: DS500-BN-00019-r5p0-21rel1.tgz
Extracting  DS500-BN-00019-r5p0-21rel1.tar     CRC Failed
Sub items Errors: 1

This behavior is observed for all compressed files downloaded from internet. If I use compressed files from different ubuntu environment or from my system itself, I dont observe this behavior.

I suspect this is being observed only in my ubuntu environment. Kindly help me in resolving this issue.

Following are the environment details

Ubuntu 12.04
$ tar --version
tar (GNU tar) 1.26
...
$ gzip --version
gzip 1.4
...

Kindly let me know if any more details are required.

3
  • what command are you using to download the file? eg curl, wget, firefox?
    – meuh
    Jul 24, 2015 at 6:08
  • Firefox. No command line tools is used to download the file.
    – Ven
    Jul 24, 2015 at 6:15
  • if you can download the file correctly on another system, can you compare the good and bad files with cmp -l to see where they start to differ. Edit your original question with the result, rather than in the comments, please.
    – meuh
    Jul 24, 2015 at 6:35

2 Answers 2

1

Try

gunzip DS500-BN-00019-r5p0-21rel1.tgz

Then the file becomes DS500-BN-00019-r5p0-21rel1.tar.

Then try

tar -xvf DS500-BN-00019-r5p0-21rel1.tar

If that doesn't work file may be corrupt. Try to find the file type by using the command

file DS500-BN-00019-r5p0-21rel1.tgz

Check the output and confirm whether it shows gzip compressed data? If not, try after downloading the file once again.

Hope this helps.

3
  • 1
    file command shows file is proper. If I try gunzip I receive the same output. "invalid compressed data -- crc error". I am quite sure that downloaded file is not corrupted because if I use the same file in different computer with ubuntu, files get uncompressed successfully. This behavior is same for all the files which I download from internet. I tried with downloading the file again, but result is same.
    – Ven
    Jul 24, 2015 at 5:01
  • Try reinstalling tar package by sudo apt-get --reinstall install tar.
    – ATR
    Jul 24, 2015 at 5:54
  • Reinstalling tar did not help. Same CRC error I am observing.
    – Ven
    Jul 24, 2015 at 6:04
0

It could be that whatever you are using to download the files is detecting that they are compressed and is uncompressing them for you. Browsers will do that sort of (un)helpful thing. Run the file command on the file to see if it says

gzip compressed data, last modified:...

which is correct, or just something like

POSIX tar archive (GNU)

which means it has been uncompressed and so use tar xf without the z.

1
  • file command says "gzip compressed data".
    – Ven
    Jul 24, 2015 at 5:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .