Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to Ubuntu and after doing some research I still can't figure what I am doing wrong. I am downloading the a package ending in .tar.gz,then I when I try to use:

tar -xvf matlab_r2011b.tar.gz

I get the following error:

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

What am I doing wrong?

share|improve this question
Probably your downloaded matlab_r2011b.tar.gz is bad file , if it provides md5sum ,cross-check for it from download source. – atenz Jun 28 '12 at 8:41

Try checking the file type with the following command:

file matlab_r2011b.tar.gz

If it tells you that it is a tar archive rather than gzip compressed data, then it is possible that the file got decompressed while being downloaded (possibly due to a faulty web server configuration on the other end). If that is the case, just rename the archive and try again:

mv matlab_r2011b.tar.gz matlab_r2011b.tar
tar xvf matlab_r2011b.tar
share|improve this answer
tar hasn't required the decompression options (-z/-j) for a while now; it seems to autodetect. – Jeremy Kerr Jun 28 '12 at 9:09
Fair enough. I've cut that part from the answer. – James Henstridge Jun 28 '12 at 9:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.