error while extracting a .gz file.

KUPI

New Member
Joined
Aug 30, 2019
Messages
27
Reaction score
5
Credits
192
Hello,
how to uncompress/unzip the file?
#tar -xzvf messages.xz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
# gzip -d messages.xz
gzip: messages.xz: unknown suffix -- ignored

could someone help me, how to fix this error.
 


Or try it as

Code:
tar -xJf filename.tar.xz

... that is a capital J

-xzvf is for Gunzip tars, as the error tells you, in effect.

Cheers

Wizard
 
As Wiz has correctly pointed out -z is the flag for zipped/gzipped tar archives, it will not work for xzip.
-J is the correct flag for extracting xzipped tar archives.

BUT - when using the -x (extract) flag:
If you leave out the compression format specifier altogether - tar will auto-magically deduce the file-type on-the-fly and will select the appropriate extraction method to use.

So for extracting/decompressing any tar archive, regardless of the compression method used - it's easier to just use:
Code:
tar -xf filename.tar.xz

And tar should be able to do the rest.
 
Thanks everyone for your reply.
we have installed the package -xz-5.0.5-4.852.x86_64
Now we are able to uncompress the file as below.
#unxz messages.xz
 
Or try it as

Code:
tar -xJf filename.tar.xz

... that is a capital J

-xzvf is for Gunzip tars, as the error tells you, in effect.

Cheers

Wizard

Hi Wizard,
Thanks for your reply.
I got the same error.
root@sagdbrs7615: tar -xJf messages.xz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors


now the issue is fixed by installing xz-5.0.5-4.852.x86_64

#unxz messages.xz
 
Hi Wizard,
Thanks for your reply.
I got the same error.
root@sagdbrs7615: tar -xJf messages.xz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors


now the issue is fixed by installing xz-5.0.5-4.852.x86_64

#unxz messages.xz


Ah, I misread the first post.
When I saw the usage of the tar command, I assumed @KUPI was using a .tar.xz file, but they were just using a .xz file. Which would directly require the xz utilities.

So the problem was actually that the user was using tar to try to open a .xz file. When they actually needed to use unxz

Well, I feel stupid now! Ha ha! XD
 
Dagnabbit, egg on my face too :) , Thanks Jas

Wiz
 
Something to put in the back of my woolly skull.
Need to as I like Open Office to work with even though there is nothing wrong with Libre Office and down loaded AOO 4.1.7 for use on Mint. So I will more than likely though switch between the two depending what I am doing.
 
Last edited:

Members online


Top