LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Unable to extract files using tar when logged in as lfs (https://www.linuxquestions.org/questions/linux-from-scratch-13/unable-to-extract-files-using-tar-when-logged-in-as-lfs-4175550850/)

LOfP@reddit 08-15-2015 04:52 PM

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

nitrohuffer2001 08-19-2015 02:32 AM

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

pan64 08-19-2015 04:09 AM

probably the user has no read permission on that file/dir or the file is located in another directory, or .....

spiky0011 08-19-2015 04:34 AM

Hi you should be in the gcc-"what-version" dir when issuing that command


untar package cd into dir follow book

hendrickxm 08-19-2015 04:39 AM

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.

LOfP@reddit 08-19-2015 08:31 AM

Whenever I try to tar any file it says Permission Denied.

spiky0011 08-19-2015 09:44 AM

But you did do binutils?
Is it just the mpfr,gmp,mpc packages?

ls -l /mnt/lfs

LOfP@reddit 08-19-2015 10:09 AM

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.

spiky0011 08-19-2015 11:22 AM

Just double check
Code:

ls -l /mnt/lfs

Luridis 08-31-2015 10:52 PM

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?


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