Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Why is this not working?

sh-3.2# tar -xzf postgresql-7.4.28.tar.gz 
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
share|improve this question
2  
Should probably be on superuser.com. –  Carl Norum Jul 16 '10 at 18:22
2  
Alternatively, you could try gunzip on the file, if you have it. Maybe you'll see a more informative error message. –  Carl Smotricz Jul 16 '10 at 18:27
    
what i gunzip or tar -xz the process just runs forever. –  Anonymous Jul 16 '10 at 18:49
    
@harmzl, did you try downloading it again? As many people below have mentioned, you probably have a corrupt file. –  Carl Norum Jul 16 '10 at 19:20
    
@Carl: As he said as a comment to my answer, checksums seem to match, so it's very unlikely to be corrupt. –  schnaader Jul 16 '10 at 19:25
add comment

migrated from stackoverflow.com Jul 17 '10 at 0:13

This question came from our site for professional and enthusiast programmers.

4 Answers

That means it's not actually a gzipped file. Use the file utility to find out what it really is, then use the appropriate flags to tar to unpack it.

share|improve this answer
    
I'd be surprised if the postgresql folks put misleading file names on their distributed stuff. Another possibility would be that the file was somehow damaged in transit. Did you know that MS Word can open (and mangle) binary files? I once had a colleague who did that a lot, and then wondered why his .EXEs weren't executing :) –  Carl Smotricz Jul 16 '10 at 18:25
    
@Carl, if it was mangled in transit, it's still not a gzip file anymore. –  Carl Norum Jul 16 '10 at 18:59
    
It might be whatever program/browser you downloaded it in figured out it was gzip encoded and unpacked it - it's not an uncommon thing. –  nos Jul 16 '10 at 19:22
    
i ended up downloading a different version, which worked fine –  Anonymous Jul 16 '10 at 20:01
1  
Strange... anyway, glad it works now –  schnaader Jul 16 '10 at 20:40
add comment

First, check if the file size and MD5 sum is correct, maybe the downloaded file is corrupt or some HTML error. This site says the MD5 sum should be fed173049eda38ce6c3348e277fabec7. There's a sha1sum, too, if you prefer this.

If this is correct, the file is not a correct .tar.gz archive and you should use some other programs to detect the filetype or decompress it, but I doubt this.

EDIT: Trying under Windows using 7-Zip, it works perfectly. Results in a TAR file 54.298.624 bytes in size and the final extraction leads to 2.761 files and 309 folders... perhaps you should try using p7zip for Mac OS X. If this works, perhaps there is something wrong with your tar/gzip and you should try to reinstall the packages.

share|improve this answer
    
checksums match, but thanks for pointing that out –  Anonymous Jul 16 '10 at 18:46
add comment

What likely happened is your browser decompressed the file in transit. This can happen because gzip is one of the ways HTTP servers will send data to your browser, so it will uncompress it in order for it to display properly.

You could try file command to see what it is. Or, alternatively, just skip to the chase and try unpacking it as such: tar xf postgresql-7.4.28.tar.gz.

share|improve this answer
add comment

I was able to extract the postgresql-7.4.28.tar.gz archive (having the MD5 fed173049eda38ce6c3348e277fabec7 mentioned above) using the original poster's command:

tar -xzf postgresql-7.4.28.tar.gz

...so I expect that we'll hear that the MD5 doesn't match.

share|improve this answer
add comment

Your Answer

 
discard

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.