LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-15-2015, 04:52 PM   #1
LOfP@reddit
LQ Newbie
 
Registered: Aug 2015
Location: Visakhapatnam,India
Distribution: Ubuntu 14.04 LTS
Posts: 11
Blog Entries: 1

Rep: Reputation: Disabled
Question Unable to extract files using tar when logged in as lfs


When logged in as lfs, I am not able to extract the files from command line.
The error is:
lfs@Home-PC:/mnt/lfs/sources$ tar -xf ../mpfr-3.1.2.tar.xz
tar: ../mpfr-3.1.2.tar.xz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

I've already chowned as said in 4.3.
I've completed Chapter 5.4 LFS, but got stuck here.
Could anyone please help me out? I am new to this forum.

Thanks
LOfP@reddit
 
Old 08-19-2015, 02:32 AM   #2
nitrohuffer2001
Member
 
Registered: Apr 2006
Posts: 165

Rep: Reputation: 19
Hi,

I assume you are talking about a file that is tar'd up and gzipped. You can use this command: tar -xvfz yourfile.tar.gz
 
Old 08-19-2015, 04:09 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
probably the user has no read permission on that file/dir or the file is located in another directory, or .....
 
Old 08-19-2015, 04:34 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 you should be in the gcc-"what-version" dir when issuing that command


untar package cd into dir follow book
 
Old 08-19-2015, 04:39 AM   #5
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
I guess you are in chapter 5, trying to compile gcc.
You need to extract gcc-*.tar.*, cd to that dir, and inside the gcc-* dir, issue those tar commands to extract gmp, mpfr and mpc.
 
Old 08-19-2015, 08:31 AM   #6
LOfP@reddit
LQ Newbie
 
Registered: Aug 2015
Location: Visakhapatnam,India
Distribution: Ubuntu 14.04 LTS
Posts: 11

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Whenever I try to tar any file it says Permission Denied.
 
Old 08-19-2015, 09:44 AM   #7
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
But you did do binutils?
Is it just the mpfr,gmp,mpc packages?

ls -l /mnt/lfs
 
Old 08-19-2015, 10:09 AM   #8
LOfP@reddit
LQ Newbie
 
Registered: Aug 2015
Location: Visakhapatnam,India
Distribution: Ubuntu 14.04 LTS
Posts: 11

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
I did binutils by going through the GUI and extracting files.
But now I want to extract those tarballs through the command line.
You can say that I had these problems since the binutils extraction.
 
Old 08-19-2015, 11:22 AM   #9
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
Just double check
Code:
ls -l /mnt/lfs
 
Old 08-31-2015, 10:52 PM   #10
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Did you forget...

Code:
chown -v lfs $LFS/tools
chown -v lfs $LFS/sources
From the host root prompt before running "su" in section 4.3?
 
  


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
[SOLVED] LFS 7.3--> tar xf lfs-bootscripts-20130123.tar.bz2 , bash : tar : command not found AkiraMizuki Linux From Scratch 3 06-01-2013 03:00 AM
wants to extract the tar.gz files rajini23 Linux - Desktop 8 02-09-2012 11:32 AM
unable to extract gcc 4.1.2 on lfs kaboyish Linux From Scratch 7 12-27-2011 12:07 PM
How can I extract only *.c files from a tar.gz? [KIA]aze Linux - Newbie 7 06-06-2007 04:39 AM
How to extract tar.bz2 files? akihandyman Linux - Newbie 3 12-21-2003 03:17 PM

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

All times are GMT -5. The time now is 01:04 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