Help: ownership problem of $LFS/tools

Ken Moffat zarniwhoop73 at
Thu Jun 18 11:00:08 PDT 2009

2009/6/18 mustapha bettich <zippo29 at>:
> Hi,
> Sorry for not been precise enough.
> I am running under Ubuntu 8.04 Hardy Heron and I installed all the packages
> needed.
> This the error I am getting:
> lfs:/mnt/lfs/sources/binutils-2.18/binutils-build$ make install
> make[1]: Entering directory `/mnt/lfs/sources/binutils-2.18/binutils-build'
> /bin/sh /mnt/lfs/sources/binutils-2.18/mkinstalldirs /tools /tools
> mkdir -p -- /tools /tools
> mkdir: cannot create directory `/tools': File exists
> mkdir: cannot create directory `/tools': File exists

 It's actually passing '/tools' twice, with a space between them.

> make[1]: *** [installdirs] Error 1
> make[1]: Leaving directory `/mnt/lfs/sources/binutils-2.18/binutils-build'
> make: *** [install] Error 2
> It is the same for the other packages.
> I found some posts on the net about the same problems but they all advise to
> redo all the steps. I retried four times following the book religiously
> until I found what I described: changing the prefix from prefix=/tools to
> prefix=/mnt/lfs/tools  'cause I read somewhere that prefix needs an absolute
> directory.

 Note: I'm still trying to get used to googlemail, I didn't
immediately see Robert
Cox's reply.  Maybe he has hit the nail on the head.  If so, please ignore what

 OK, google found two posts for me, one with the conversation and headings in
what is probably Chinese, the other in French.  From the latter, the advice was
to run the script from 'host system requirements' in part (iv)
of the preface, and to check the results of all the packages.

 Normally, mkdir -p will NOT complain if a file already exists, it will return
a status of success.  In your case, mkdir appears to be different.  On most
recent linux systems, it is one of the packages installed by coreutils.  But,
an error in coreutils seems unlikely - as a normal user in your home directory
try 'mkdir -p foo' and do it again - does it report an error ?  If so,
the version
of mkdir is the problem.

BUT, you say that passing the prefix as /mnt/lfs/tools works.  I'm starting
to believe this is probably a problem caused by using sudo.

 Can you get a root login shell by using 'sudo /bin/bash', and from there do
things in the way that the book says ?

 I understand the attraction of 'sudo' for regular distributions, but
/etc/sudoers is always a compromise between functioality and security.  When
the aim is to use a distro as a host to build a new LFS system, actually
becoming root is far more straightforward.


More information about the lfs-support mailing list