LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 09-17-2003, 07:58 PM   #1
Dewar
Member
 
Registered: Sep 2003
Location: Washington State
Distribution: SuSE 8.0, SuSE 9.0, Slack 9.1
Posts: 90

Rep: Reputation: 15
Why can't I unzip a .tar.gz file


I have downloaded several .tar.gz files containing source code for various packages. When I try to unzip them (using zcat <filename>, tar -zxvf <filename>, or gunzip <filename>) I ger the following error: invalid compressed data--format violated.

I doubt that every file I've downloaded is corrupt, so what simple stupid mistake am I making to cause this error to keep coming up?

-Dewar
 
Old 09-17-2003, 08:08 PM   #2
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Verify that the files are in fact GZip by using the file command.
Code:
file filename
 
Old 09-17-2003, 08:49 PM   #3
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Rep: Reputation: 30
try:

tar xvzf $file_name
 
Old 09-18-2003, 11:07 AM   #4
Dewar
Member
 
Registered: Sep 2003
Location: Washington State
Distribution: SuSE 8.0, SuSE 9.0, Slack 9.1
Posts: 90

Original Poster
Rep: Reputation: 15
The file command gives me the following info:

gzip compressed data, deflated, last modified.... max compression, os: Unix

the tar command without the dash gives me the same output as the command with the dash.

For a little background, I'm using SuSE professional 8.0 with a 2.4.18 kernel.

Thanks for the help,
-Dewar
 
Old 09-18-2003, 11:30 AM   #5
andrewlkho
Member
 
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 30
okay, try to first just gunzip them:
gunzip $file
and post back results
 
Old 09-18-2003, 12:15 PM   #6
Dewar
Member
 
Registered: Sep 2003
Location: Washington State
Distribution: SuSE 8.0, SuSE 9.0, Slack 9.1
Posts: 90

Original Poster
Rep: Reputation: 15
Gunzip was included in the list of command's I'd tried in the first post. gunzip, tar, and zcat all give me the same error. Strangely, winzip in windows NT lets me open it up fine.

-Dewar
 
Old 09-18-2003, 02:50 PM   #7
BigNate
Member
 
Registered: Mar 2003
Location: Harrisburg, PA
Distribution: Gentoo, Debian, Ubuntu, Red Hat/CentOS
Posts: 719

Rep: Reputation: 30
what is the file. I'll d/l it and try to open it.
 
Old 09-18-2003, 03:01 PM   #8
Xterminator
Member
 
Registered: Sep 2002
Location: São Paulo -Brazil
Posts: 76

Rep: Reputation: 15
hi winzip open archive ?
try:unzip
or
gzip -d file.tar.gz | tar-xvf file.tar
 
Old 09-18-2003, 05:07 PM   #9
Dewar
Member
 
Registered: Sep 2003
Location: Washington State
Distribution: SuSE 8.0, SuSE 9.0, Slack 9.1
Posts: 90

Original Poster
Rep: Reputation: 15
Thanks for the help everyone, but I was overcomplicating things. When I was transfering the file from the windows machine where it resides, not transfering in binary cause some data errors. Once I figured that out, and re-transfered the file, all was well.

-Dewar
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to unzip a ***.tar.bz2 file in Windows RajRed General 17 11-04-2005 10:47 AM
D/l a .tgz.tar file..how to unzip Navop Linux - Newbie 1 03-13-2005 08:56 AM
How to unzip and untar a xxx.tar.gzip.part file> linuxharsha Linux - Software 8 02-15-2004 05:27 AM
How to untar and unzip .tar.gzip.part file? linuxharsha Linux - Software 2 02-14-2004 11:37 AM
unzip a tar.gz file klfreese Linux - Newbie 1 07-23-2003 12:35 AM


All times are GMT -5. The time now is 11:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration