why my bash doesn't work correctly?
There should be no error when I compile Bash and other softwares.
After I finish the preparing part, I use the below command to change the root:
chroot $LFS /static/bin/env -i \
HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
However, to my surprise, there will be such an error like 'bash: cd: static/bin/ls: No such file or directory' when I input most of commands.
But when I type /static/bin/l , and type the key TAB, the bash shows the right files
ld ln locate logname ls ls_tmp
And I type /static/bin/ls, there is still the same error.
I have no name!:/# /static/bin/ls
bash: /static/bin/ls: No such file or directory
What is the matter? Is there something wrong with my Bash. I have compile it twice.
And the more surprising is that there is no error when I input the command such as 'chroot' and 'env'.
I really don't know what is the problem and what should I do.
It could be that /static/bin/ls is generating this error, rather than BASH. Try running it, and check that all the ldd links (if any) are present and correct.
What is the value of $LFS? If it's /static then BASH is actually looking for /static/static/bin/ls because it's being chrooted to /static/
What's this directory /static? I've not seen that in the book. The book works. Try following the book.
sounds like $LFS is not in the $PATH
I know the problem now.
The program ls is compiled with dynamic link.
After I compile it with static link, everything is OK now.
Thank you for your help
|All times are GMT -5. The time now is 11:04 AM.|