satimis 发表于 2005-7-23 23:29:46

/tools/bin/env: /tools/bin/bas

Hi folks,

LFS 6.1
FC3 Host

Following problem was encountered on building LFS 6.1

# chroot "$LFS" /tools/bin/env -i
HOME=/root TERM="$TERM" PS1='\u:\w\$ '
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
/tools/bin/bash --login +h
/tools/bin/env: /tools/bin/bash: No such file or directory

# find / -name bash/root/bash
/root/Desktop/Trash/bash-3.0/bash
/mnt/lfs/sources/bash-3.0/bash
/mnt/lfs/tools/bin/bash
/bin/bash

# find / -name env
/usr/share/doc/db4-devel-4.2.52/ref/env
/usr/bin/env
/mnt/lfs/sources/coreutils-5.2.1/src/env
/mnt/lfs/tools/bin/env
/bin/env

# ls -al /mnt/lfs/tools/bin/bash*
-rwxr-xr-x1 root root 1438193 Jul 23 10:18
/mnt/lfs/tools/bin/bash
-r-xr-xr-x1 root root    6806 Jul 23 10:18
/mnt/lfs/tools/bin/bashbug

# ls -al /mnt/lfs/tools/bin/env*
-rwxr-xr-x1 lfs lfs 12952 Jul 21 18:37
/mnt/lfs/tools/bin/env
-rwxr-xr-x1 lfs lfs 10032 Jul 21 18:37
/mnt/lfs/tools/bin/envsubst

The files were there.Please advise how to fix it.TIA

B.R.
satimis

linky_fan 发表于 2005-7-24 20:18:16

what is your $PATH?

satimis 发表于 2005-7-24 20:48:13

Hi linky_fan,

Tks for your advice.

what is your $PATH?Sorry, I don't follow.Please explain.Or advise me the command to run for testing.

Whether you meant;
# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin


What I discovered was;
# ls -al /tools
lrwxrwxrwx1 root root 15 Jun 28 17:06 /tools -> //mnt/lfs/tools

The FC3 host's /tools symbolic linked to //mnt/lfs/tools of LFS

It has 2 back slash "//" not 1 like "/mnt/lfs/tools"

B.R.
satimis

applepie 发表于 2005-7-25 08:15:02

Hi linky_fan,

Tks for your advice.

what is your $PATH?Sorry, I don't follow.Please explain.Or advise me the command to run for testing.

Whether you meant;
# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin


What I discovered was;
# ls -al /tools
lrwxrwxrwx1 root root 15 Jun 28 17:06 /tools -> //mnt/lfs/tools

The FC3 host's /tools symbolic linked to //mnt/lfs/tools of LFS

It has 2 back slash "//" not 1 like "/mnt/lfs/tools"

B.R.
satimis

"//mnt/lfs/tools" and "/mnt/lfs/tools" are no different

satimis 发表于 2005-7-25 08:34:47

Hi applepie,

"//mnt/lfs/tools" and "/mnt/lfs/tools" are no differentNoted with thanks.

B.R.
satimis

linky_fan 发表于 2005-7-25 14:53:00


/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin



Try give a "/tools/bin" at the end of the $PATH. :arrow:

satimis 发表于 2005-7-25 15:38:36

Hi linky_fan,

Try give a "/tools/bin" at the end of the $PATH.
$ su - lfs
Password:
lfs:~$ cd /mnt/lfs/
lfs:/mnt/lfs$ lsprocsourcessystools
lfs:/mnt/lfs$ echo $PATH tools/bin//tools/bin:/bin:/usr/bin tools/bin/
B.R.
satimis

linky_fan 发表于 2005-7-26 13:49:15

呵呵, PATH=$PATH:/tools/bin ; export PATH

satimis 发表于 2005-7-26 14:12:39

Hi linky_fan,

PATH=$PATH:/tools/bin ; export PATHStarted PC

$ su -
Password:
# export LFS=/mnt/lfs
# mount /dev/hda6 /mnt/lfs/
# mkdir -p $LFS
# echo $LFS
/mnt/lfs
# su - lfs
lfs:~$ PATH=$PATH:/tools/bin ; export PATH
No output

lfs:~$ cd /mnt/lfs/
lfs:/mnt/lfs$ PATH=$PATH:/tools/bin ; export PATH
No output

lfs:/mnt/lfs$ ls
procsourcessystools
lfs:/mnt/lfs$ exit
exit

# PATH=$PATH:/tools/bin ; export PATH
No output

# mkdir -p $LFS/{proc,sys}
# mount -t proc proc $LFS/proc
# mount -t sysfs sysfs $LFS/sys
# mount -f -t tmpfs tmpfs $LFS/dev
# mount -f -t tmpfs tmpfs $LFS/dev/shm
# mount -f -t devpts -o gid=4,mode=620 devpts LFS/dev/pts
# PATH=$PATH:/tools/bin ; export PATH
All no output

B.R.
satimis

linky_fan 发表于 2005-7-26 22:45:06


PATH=$PATH:/tools/bin/
export PATH

Add these two lines in your /home/lfs/.bash_profile, if you havn't it , vim a new.
Then use the user"lfs" login (not su -), do "echo $PATH" and take a look at it.
If you can see the /tools/bin/ appears at the end of $PATH, try the steps upstairs.

satimis 发表于 2005-7-26 23:15:08

Hi linky_fan,

PATH=$PATH:/tools/bin/
export PATH
Add these two lines in your /home/lfs/.bash_profile
Then use the user"lfs" login (not su -), do "echo $PATH" and take a look at it.
If you can see the /tools/bin/ appears at the end of $PATH, try the steps upstairs.$ su -
Password:
# ls /homelfslost+foundnewusersatimis
# ls -al /home/lfstotal 72
drwx------2 lfslfs   4096 Jul 26 10:18 .
drwxr-xr-x6 root root4096 Jun 28 17:13 ..
-rwxr-xr-x1 lfslfs   4482 Jul 26 10:18 a.out
-rw-------1 lfslfs11664 Jul 26 18:19 .bash_history
-rw-r--r--1 lfslfs   59 Jul 18 19:07 .bash_profile
-rw-r--r--1 lfslfs   96 Jul 18 19:09 .bashrc
-rw-r--r--1 lfslfs      9 Jul 26 10:18 dummy.c
-rw-r--r--1 lfslfs   51 Jul 26 09:44 output.txt]
# nano /home/lfs/.bash_profileexec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
PATH=$PATH:/tools/bin/
export PATH
(Remark: the file only has one line
-i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash)

# export LFS=/mnt/lfs
# mount /dev/hda6 /mnt/lfs
# echo $LFS/mnt/lfs
# su - lfs
lfs:~$ echo $PATH/tools/bin:/bin:/usr/bin
"/tools/bin" at the beginning

lfs:~$ ls -altotal 72
drwx------2 lfslfs   4096 Jul 26 02:18 .
drwxr-xr-x6 root root4096 Jun 28 09:13 ..
-rw-------1 lfslfs11664 Jul 26 10:19 .bash_history
-rw-r--r--1 lfslfs   94 Jul 26 14:56 .bash_profile
-rw-r--r--1 lfslfs   96 Jul 18 11:09 .bashrc
-rwxr-xr-x1 lfslfs   4482 Jul 26 02:18 a.out
-rw-r--r--1 lfslfs      9 Jul 26 02:18 dummy.c
-rw-r--r--1 lfslfs   51 Jul 26 01:44 output.txt]lfs:~$ echo /mnt/lfs/$PATH/mnt/lfs//tools/bin:/bin:/usr/bin
lfs:~$

B.R.
satimis

linky_fan 发表于 2005-7-28 15:04:51


lfs:~$ echo $PATH
代码:
/tools/bin:/bin:/usr/bin

"/tools/bin" at the beginning

it is unreasonable-_-.

Try ln -sf /tools/bin/bash /tools/bin/sh and do a "chroot" again. :arrow:

Good luck

satimis 发表于 2005-7-28 16:01:07

Hi linky_fan,

LFS 6.1
=======
Tks for your advice.

Finally I got chroot done.

# /usr/sbin/chroot "$LFS" /tools/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin /tools/bin/bash --login +hI have no name!:/#

The solution was removing basb-3.0 and to reinstall it from its tarball.Make sure;

/tools/bin/gcc

/tools/bin/g++

/mnt/lfs/tools/bin/bash
   

and
echo $PATH
/tools/bin:/bin:/usr/bin

"/tools/bin" befor "/usr/bin"

I'm now moving on to following sections.

B.R.
satimis

linky_fan 发表于 2005-7-31 20:31:25

Good Luck:wink:
页: [1]
查看完整版本: /tools/bin/env: /tools/bin/bas