Problem: I tried to unzip a file MyFile.tar.gz which looked like a gzipped file by the name. But while unzipping I encountered an error “gzip stdin not in gzip format” which was as following:
$tar xvzf MyFile.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
The error indicates that the file is not in gZipped format. Then which format is it in? To find out, I ran the ‘file’ command on it:
file MyFile.tar.gz
MyFile.tar.gz: POSIX tar archive (GNU)
Reason: Reason for the error is quite evident. The file is not a gzipped file but a POSIX tar archive file. Which means it was not zipped at all but instead it was compressed using tar. It was simply renamed afterwards, I believe.
Perhaps the creator of the file wanted to gzip a directory but couldn’t do that because the directory needs to be archived using tar first. Confused? I recommend reading this article to learn the difference between tar and zip.
Solution: Since it was not a gzipped file, a simple tar is able to extract the file:
tar xvf MyFile.tar.gz
Now that’s how I fixed this problem. I advise you run the file command on your file and see what kind of archive file it is.
If your file too is in POSIX tar archive format, you can use the same command that I have used in the above example.
If it’s in some other archive format, then you should run the appropriate command to extract the archive file. You have to search on the internet a bit about how to extract that certain kind of archive file. It should not be a difficult task if you have even a little bit of experience with Linux commands.
I hope you found it helpful. Cheers :)
Thanka all of the contributors:
I have solved the problem in the following way:
1- Right-click the file (ojs-3.2.1-2.tar.gz)
2- Click the button ‘compress’ on the top right.
3- Chose the option ‘gz’,
4- Right-click the new file (It is renamed automatically as ‘ojs-3.2.1-2.tar.gz.gz’ I deleted the first ‘gz’ but I do not know whether it is effective.)
5-Click ‘Extract’.
It worked.
How do you “right-click” in command-line, Mehmet?! ;)
It works! Thank you for pointing this out!
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
I am also facing same problem , i need help to solve this
THANK YOU SO MUCH. I was about to destroy my computer.
Glad to save your computer ;)
If your file format is ASCII text it could mean that probably the url is not hosting the file, this could be caused by the resource not beign available in such url anymore. You are fetching an error website.