LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Installation of Binutils error (http://www.linuxquestions.org/questions/linux-from-scratch-13/installation-of-binutils-error-610907/)

jwsawyer 01-03-2008 03:13 PM

Installation of Binutils error
 
lfs:~$ mkdir -v ../binutils-build
mkdir: cannot create directory `../binutils-build': Permission denied

I followed all the directions up to this point and had no problems.

Acron_0248 01-03-2008 03:47 PM

Hi,


I think that you missed the part where it says that the books assumes that you enter the source directory after decompress something, let me clarify that:
Code:

# This is what the book hopes you do everytime
tar -xvf package-1.2.tar.gz
cd package-1.2

And this is important because the if you've followed every instruction of the book, you should have a tools directory owned by the user you use to work with lfs but the same user doesn't own the root tree. So, let say you have this:
Code:

/media/lfs/tools
And 'tools' is owned by lfsuser (is an example), but 'lfs' is not owned by the same user, so, if you do this:
Code:

[root@localhost:/media/lfs/tools]: tar -xvf package-1.2.tar.gz
#and then you do this:
[root@localhost:/media/lfs/tools]: mkdir ../package-build

You'll get the permission denied error because your telling the system that it has to create the directory above the current directory, that with the above examples will be /media/lfs and not /media/lfs/tools where it should be.

So, this is what you have to do:
Code:

[root@localhost:/media/lfs/tools]: tar -xvf binutils-version.tar.gz
[root@localhost:/media/lfs/tools]: cd binutils-version
[root@localhost:/media/lfs/tools/binutils-version]: mkdir ../binutils-build

Change 'version' with the version of the package ;)



Regards

jwsawyer 01-03-2008 04:26 PM

Quote:

Originally Posted by Acron_0248 (Post 3010182)
Hi,


I think that you missed the part where it says that the books assumes that you enter the source directory after decompress something, let me clarify that:
Code:

# This is what the book hopes you do everytime
tar -xvf package-1.2.tar.gz
cd package-1.2

And this is important because the if you've followed every instruction of the book, you should have a tools directory owned by the user you use to work with lfs but the same user doesn't own the root tree. So, let say you have this:
Code:

/media/lfs/tools
And 'tools' is owned by lfsuser (is an example), but 'lfs' is not owned by the same user, so, if you do this:
Code:

[root@localhost:/media/lfs/tools]: tar -xvf package-1.2.tar.gz
#and then you do this:
[root@localhost:/media/lfs/tools]: mkdir ../package-build

You'll get the permission denied error because your telling the system that it has to create the directory above the current directory, that with the above examples will be /media/lfs and not /media/lfs/tools where it should be.

So, this is what you have to do:
Code:

[root@localhost:/media/lfs/tools]: tar -xvf binutils-version.tar.gz
[root@localhost:/media/lfs/tools]: cd binutils-version
[root@localhost:/media/lfs/tools/binutils-version]: mkdir ../binutils-build

Change 'version' with the version of the package ;)



Regards

It gives me an error message saying no such file or directory. The file is binutils-2.17.tar.bz2

I used tar xzvf instead of -xvf since it was bz2

lfs:~$ tar xzvf binutils-2.17.tar.bz2
tar: binutils-2.17.tar.bz2: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors

gilead 01-03-2008 04:34 PM

You're in the lfs directory (your prompt shows lfs as the current directory), instead of the tools directory. Can you try this:
Code:

cd tools
tar -xjf binutils-2.17.tar.bz2
or
tar -xjvf binutils-2.17.tar.bz2

Then you'd use the steps that Acron_0248 describes:
Code:

cd binutils-2.17
mkdir ../binutils-build


jwsawyer 01-03-2008 04:47 PM

Quote:

Originally Posted by gilead (Post 3010226)
You're in the lfs directory (your prompt shows lfs as the current directory), instead of the tools directory. Can you try this:
Code:

cd tools
tar -xjf binutils-2.17.tar.bz2
or
tar -xjvf binutils-2.17.tar.bz2

Then you'd use the steps that Acron_0248 describes:
Code:

cd binutils-2.17
mkdir ../binutils-build


Got past this. I'm on the next step with a new error. LOL

lfs:/mnt/lfs/binutils-build$ CC="gcc -B/usr/bin/" ../binutils-2.17/configure --prefix=/tools --disable-nls --disable-werror
bash: ../binutils-2.17/configure: No such file or directory

gilead 01-03-2008 05:11 PM

The two things are related. You have created /mnt/lfs/binutils-build instead of /mnt/lfs/tools/binutils-build so the command you're running can't find /mnt/lfs/tools/binutils-2.17. If you don't have a /mnt/lfs/tools/binutils-2.17 directory then something has gone wrong and you may have missed a step from the docs.

Acron_0248 01-03-2008 07:15 PM

Use this:
Code:

CC="gcc -B/usr/bin/" ../tools/binutils-2.17/configure --prefix=/tools --disable-nls --disable-werror
You should pay more attention to directory paths while you read the book and read (and understand) the commands you're using, I'm not saying this to annoy you, but is true, the errors you're having are because you're not paying attention to directory paths




Regards


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