SOLVE gzip: stdin: not in gzip format centos 7 – tar: error is not recoverable: exiting now

Are you facing an error which says that gzip: stdin : not in gzip format -tar: error is not recoverable: exiciting now? When you find any error on your PC, including this error, of course you have to fix it so that it can work well again. Now, how about this error? How to solve this error?

Well, when we tried to search about the solution about this error, actually there are a lot of people who discuss about it in forums. Here are the problems and also the solutions that some other people give in the forums that you may try to apply for solving this error.

SOLVE gzip stdin not in gzip format centos 7 - tar error is not recoverable exiting now

A user named ServerSideSkittles in Stack Overflow tells that he has a bash script which creates a tar.gz and encrypts then sends to drive. But, he cannot open the .tar.gz afterwards. In that forum, he shows the process including the scripts. And then, when he tries this:

sudo tar -zxvf red-backup-2016-09-22.tar.gz, he gets this:

gzip: stdin: not in gzip format

tar: Child returned status 1

tar: Error is not recoverable: exiting now

Then, there are some people who try to give him some solutions. Roopendra says that this error happens might be because of his gzip version incompatibity. So, he can check points first: which gzip /usr/bin/gzip or /bin/gzip. It should be either /bin/gzip or /usr/bin/gzip. In case your gzip points to some other gzip application, he suggests to try by removing that path from your PATH env variable. Furthermore, he also suggest to do the next thing which is gzip -V. Gzip 1.3.5 (2002-09-30). He says that his problem is able to be resilve with these check points.

Souvik, another user, also tries to give solution. He says that when this error comes up, it means that the file is not really a gzipped tar file or, any kind of gzipped file, even though being named like one. In addition, he says that when he downloads a file with wget, he has to check for indications like Length: unspecified [text/html] which displays it is plain text and that it is supposed to be interpreted as html. Also, check file, head, less, view utilities to be able to check the file. Then, he also suggests to try downloading from the official site and then check whether the download links have changed. Also, he suggests to check proxy seting and make sure that you have the correct proxies enabled to download/wget it from the right source.

Then, Kamran Kausar, also give his suggestion about this error. He suggests to check the type of compression by using this file command:

 file name_name.tgz

O/P- If output is “XZ compressed data”

And then you have to use tar xf <archive name> to be able to unzip the file, for example:

  • tar xf archive.tar.xz
  • tar xf archive.tar.gz
  • tar xf archive.tar
  • tar xf archive.tgz

In the It’s Foss site, there is also a story about this error. Someone has a problem where when he tries to unzip a file MyFile.tar.gz which looks like a gzipped file by the name. However, while he is unzipping, he finds an error ‘gzip stdin not in gzip format’. The error means that the file is not in gZipped format. So, which format is it in? To be able to find out, you are able to run the file command on it:

file MyFile.tar.gz

MyFile.tar.gz: POSIX tar archive (GNU)

The reason of this error is quite evident. The file is not a gzipped file but it is a POSIX tar archive file. It means that it was not zipped at all but instead it was compressed using tar. It was simply renamed afterwards. The creator of the file may want to gzip a directory. However, he could not do that since the directory must be archived by using tar first. So, the solution is because it was not a gzipped file, a simple tar can extract the file:

tar xvf MyFile.tar.gz

So, you are able to run the file command on your file and see what kind of archive file it is. In case you see that your file too is in POSIX tar archive format, you are able to use the similar command that he used in the example above. However, in case it is in some other archive format, you are able to run the suitable command to extract the archive file.

In the Askubuntu, there is also a discussion about it. He says that when he runs this: tar -zxvf john-1.7.0.2.tar.gz and then he get this:

gzip: stdin: not in gzip format

tar: Child returned status 1

tar: Error is not recoverable: exiting now

Another user named Eliah Kagan, gives the suggestion to solve this problem as you can see below.

  • You have to diagnose a Downloading File of the Wrong Type. It means that the file is not really a gzipped tar file. You are able to use the file utility which examines a file and tells you what kind of file it looks to be.
  • You have to get the right file. It tells you how to find what went wrong in these conditions. You may wonder how to find and download the correct file. It varies from situation to situation. However, you are able to do the things below for a good start.

– First, you have to access the official site for the software and then see whether they provide download links. Even if you do it before, however, you need to know that if some time has passsed, you may find that the link has changed.

– Then, you have to go to the page that you were redirected to when you downloaded the file. In this case, that is www.openwall.com/john/. Or, you are able to examine the file that was downloaded or you are able to open it in a web browser.

    • Note that you do not always need to build from source. Sometimes, you want the recent version of a program and it is not in Ubuntu’s repositories. You may try to find a PPS, but if you do not find any you really trust or you want to build it with custom options, or you really like building from source code, then building from source code is valuable and useful technique. So, it is recommended to check at least the software that is available in Ubuntu’s offficial repositories for your system.