chroot problem

Ken Moffat ken at
Wed Mar 25 08:15:59 PDT 2009

On Wed, Mar 25, 2009 at 06:53:04PM +0530, rajesh britto wrote:
> root:~/linux- set | grep PATH
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
> On 3/24/09, Mike McCarty <Mike.McCarty at> wrote:
 By top-posting, you are making it hard for people to follow what
you are replying to.  On most linux lists, it is considered bad
form.  In other places, particularly where people use windows, it
seems to be regarded as normal.  On this list, you should also trim
what you are replying to.

 In this case, your original problem was
> > rajesh britto wrote:
> > > hi,
> > >  i entered into the chroot environment and then i tried to install the
> > > packages. but it shows the error:
> > >
> > > root:~/linux- pwd
> > > /root/linux-
> > > root:~/linux- make mrproper
> > > make: gcc: Command not found
> > > root:~/linux-
> > >
> > > dont know how to proceed. help me in this issue.
> > >
> > > Note: I am in the chroot environment not in the systems root directory.
> >
> > What is your PATH variable?

 So, your PATH looks sane.  You now have to figure out why gcc is
not being found in 'make mrproper'.  I can think of three likely

1. For some reason, you didn't build the second pass of gcc in
chapter 5.

2. You missed one or more of the essential symlinks.

3. GCC is linked to the host's libraries.

 Some steps to help you solve this:

 First, review the essential symlinks (section 6.6).  If those are
all OK (i.e. they exist AND the files they are pointing to also
exist), in chroot:

type -p gcc

 if gcc exists,
readelf -l $(type -p gcc) | grep Requesting
ldd -l $(type -p gcc)

 If everything those show is in /tools, write a test program to find
 out where it breaks:
echo 'main(){ puts("hello");}' > hello.c
gcc -o hello hello.c

 if no problems with that

das eine Mal als Tragödie, das andere Mal als Farce

More information about the lfs-support mailing list