LFS Chroot error: "chroot: failed to run command '/usr/bin/env': No such file or directory"
by miwag from LinuxQuestions.org on (#6NS4G)
Hi everyone,
I am in the process of building my own distro with Linux from Scratch. My book version is 12.1 Stable.
Now I am at chapter 7.4 and want to enter the chroot environment, but when I enter the command, I get the following error message:
chroot: failed to run command '/usr/bin/env': No such file or directory
The command used is the following:
chroot "$LFS" /usr/bin/env -i \
HOME=/root \
TERM="$TERM" \
PS1='(lfs chroot) \u:\w\$ ' \
PATH=/usr/bin:/usr/sbin \
MAKEFLAGS="-j$(nproc)" \
TESTSUITEFLAGS="-j$(nproc)" \
/bin/bash --login
Of course executed with sudo as written in the book.
The file "env" is present in my LFS partition in the directory /usr/bin/, so "No such file or directory" cannot actually be correct. Why does it not recognize the file?
Is the command even correct as it is written above (I copied it from the page)? The $LFS is there in quotation marks and is separated from the rest of the path. Shouldn't they actually be connected?
I hope someone can help me.
I am in the process of building my own distro with Linux from Scratch. My book version is 12.1 Stable.
Now I am at chapter 7.4 and want to enter the chroot environment, but when I enter the command, I get the following error message:
chroot: failed to run command '/usr/bin/env': No such file or directory
The command used is the following:
chroot "$LFS" /usr/bin/env -i \
HOME=/root \
TERM="$TERM" \
PS1='(lfs chroot) \u:\w\$ ' \
PATH=/usr/bin:/usr/sbin \
MAKEFLAGS="-j$(nproc)" \
TESTSUITEFLAGS="-j$(nproc)" \
/bin/bash --login
Of course executed with sudo as written in the book.
The file "env" is present in my LFS partition in the directory /usr/bin/, so "No such file or directory" cannot actually be correct. Why does it not recognize the file?
Is the command even correct as it is written above (I copied it from the page)? The $LFS is there in quotation marks and is separated from the rest of the path. Shouldn't they actually be connected?
I hope someone can help me.