LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 02-16-2012, 10:58 AM   #1
Benyi
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Rep: Reputation: Disabled
tar.xz decompress?


Hi LinuxQuestions, thanks for resolving my previous question.
But...i have a new question.

I have to unzip the following package in Linux From Scratch:
Code:
gmp-5.0.4.tar.xz
I try as it says on the official website:
Code:
tar-jxf .. / gmp-5.0.4.tar.xz
But I get the following error message:
Code:
tar: invalid option - J
Try it with "j" tiny, and says:
Code:
bzip2 (stdin) is not a bzip2 file
Then I happened to install:
Code:
Xz-5.0.3
Install it and try to unzip as follows:
Code:
tar-xz-5.0.4.tar.xz gmp
but ... flashing dash appears ... and so remains ...

I can do to decompress the tar.xz?
 
Old 02-16-2012, 11:02 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
try
Code:
tar -xvf
Kind regards
 
Old 02-16-2012, 11:24 AM   #3
Benyi
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by repo View Post
try
Code:
tar -xvf
Kind regards

Hi , thanks for answering, but...try it with-xvf, and i get:

Code:
tar: file does not seem to "tar"
 
Old 02-16-2012, 11:56 AM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

I am guessing you are at chapter 5.5?

Have you downloaded GMP to /mnt/lfs/sources?
Then you have to untar gcc-4.61 cd into gcc dir then run the tar command from within the gcc dir.

/mnt/lfs/sources/gcc-4.6.1 then run command tar -jxf ../gmp-5.0.2.tar.bz2.

Gmp-5.0.2 is a bz2
http://ftp.gnu.org/gnu/gmp/gmp-5.0.2.tar.bz2

Ps

I did look at the website and found gmp-5.0.4.bz2
Not sure if it,s a good idea to use it, It might be a good idea to stick to the book

Last edited by spiky0011; 02-16-2012 at 12:33 PM. Reason: Added comment
 
Old 02-16-2012, 01:24 PM   #5
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
xz is relatively new. Afaik, it is not integrated in the tar command like gzip and bzip2 are.

First decompress the file with the appropriate xz command (I _think_ it's unxz.)

unxz foo.tar.xz

then untar the resulting foo.tar file

tar -xvf foo.tar
 
Old 02-16-2012, 08:19 PM   #6
liberalchrist
Member
 
Registered: Jun 2011
Location: Chester, SC
Distribution: Slackware Current
Posts: 142

Rep: Reputation: 33
This is just a guess, but your posts consistently show that you allow no space between your "tar" command and the options. You installed the proper software, i.e., XZ. Thus "tar -xvf" should now work for everything left in the book. Tar will select the necessary tool for you. If the syntax is wrong, nothing will work. Try again with a space between the "tar" and the "-".
 
Old 02-17-2012, 01:19 AM   #7
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
That might work for gz and bz2, depending on the host distro. There are some weird customized tar commands out there. But standard tar requires that the compression type dependant switch (z for gzip and j for bzip2) be given. (I assume you know the x switch is 'extract'). The Xz compression is so new it's unlikely his tar knows about it. Anyway, I just build lfs7.0 and I had the same problem. The only solution I found was the one I gave. Btw, you can do the same with tar.gz and tar.bz2 files, using gunzip and bunzip2 respectively.
 
Old 02-17-2012, 05:10 AM   #8
liberalchrist
Member
 
Registered: Jun 2011
Location: Chester, SC
Distribution: Slackware Current
Posts: 142

Rep: Reputation: 33
XZ support in tar is now 3 years old, but I know some still rely on tar-1.13. I use 2 versions, relying on 1.13 only for pkgtool. My point was really more about syntax than anything.
 
Old 02-17-2012, 01:59 PM   #9
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
No problem. I didn't know that the newest versions of tar had Xz support. I'll have to check into that. I don't think that the op was having syntax problems, as I had a very similar experience and I was copy and pasting commands right out of the lfs 7.0 book.
 
Old 02-18-2012, 07:29 PM   #10
Benyi
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
I was using a package of the latest version, I did not realize. Now download the correct version and was able to decompress!
Thank you!
 
  


Reply



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 can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
Decompress *.tar.tar files vathsan AIX 3 10-11-2008 12:47 PM
How can I decompress this .tar file? okonita Linux - Newbie 3 06-14-2008 06:34 AM
decompress tar gz files? buccaneer Linux - Newbie 5 01-19-2004 02:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:08 AM.

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
Open Source Consulting | Domain Registration