LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2419|回复: 11

bash: /usr/bin/localedef: No such file or directory

[复制链接]
发表于 2005-7-27 23:03:59 | 显示全部楼层 |阅读模式
Hi folks,

LFS 6.1

Moved on to

6.11. Glibc-2.3.4
http://www.linuxfromscratch.org/ ... hapter06/glibc.html

<snip>

root:/sources/glibc-build# make check
  1. ...
  2. .....
  3. mv -f /sources/glibc-build/tls.makeT /sources/glibc-build/tls.make
  4. make[1]: Leaving directory `/sources/glibc-2.3.4'
  5. make[1]: Entering directory `/sources/glibc-2.3.4'
  6. make  -C csu tests
  7. make[2]: Entering directory `/sources/glibc-2.3.4/csu'
  8. make[2]: *** No rule to make target `/sources/glibc-build/csu/tst-empty.out', needed by `tests'.  Stop.
  9. make[2]: Leaving directory `/sources/glibc-2.3.4/csu'
  10. make[1]: *** [csu/tests] Error 2
  11. make[1]: Leaving directory `/sources/glibc-2.3.4'
  12. make: *** [check] Error 2
复制代码


root:/sources/glibc-build# touch /etc/ld.so.conf
root:/sources/glibc-build# make install
  1. ...
  2. ......
  3. make[4]: Entering directory `/sources/glibc-2.3.4/stdlib'
  4. make[4]: Nothing to be done for `rtld-all'.
  5. make[4]: Leaving directory `/sources/glibc-2.3.4/stdlib'
  6. make -C ../string objdir=/sources/glibc-build -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-strchr.os rtld-strcmp.os rtld-strlen.os rtld-strnlen.os rtld-memchr.os rtld-memmove.os rtld-memset.os rtld-mempcpy.os rtld-stpcpy.os rtld-memcpy.os'
  7. make[4]: Entering directory `/sources/glibc-2.3.4/string'
  8. make[4]: Nothing to be done for `rtld-all'.
  9. make[4]: Leaving directory `/sources/glibc-2.3.4/string'
  10. make -C ../time objdir=/sources/glibc-build -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-setitimer.os'
  11. make[4]: Entering directory `/sources/glibc-2.3.4/time'
  12. make[4]: Nothing to be done for `rtld-all'.
  13. make[4]: Leaving directory `/sources/glibc-2.3.4/time'
  14. make[3]: Leaving directory `/sources/glibc-2.3.4/elf'
  15. make[2]: *** No rule to make target `/sources/glibc-build/dlfcn/libdl.so.2', needed by `/sources/glibc-build/elf/sprof'.Stop.
  16. make[2]: Leaving directory `/sources/glibc-2.3.4/elf'
  17. make[1]: *** [elf/subdir_install] Error 2
  18. make[1]: Leaving directory `/sources/glibc-2.3.4'
  19. make: *** [install] Error 2
复制代码


root:/sources/glibc-build# mkdir -p /usr/lib/locale
root:/sources/glibc-build# localedef -i de_DE -f ISO-8859-1 de_DE
  1. bash: /usr/bin/localedef: No such file or directory
复制代码

root:/sources/glibc-build# localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
  1. bash: /usr/bin/localedef: No such file or directory
复制代码

root:/sources/glibc-build# localedef -i en_HK -f ISO-8859-1 en_HK
  1. bash: /usr/bin/localedef: No such file or directory
复制代码


root:/sources/glibc-build# which localedef
  1. bash: which: command not found
复制代码


root:/sources/glibc-build# ls -al /mnt/
  1. total 12
  2. drwxr-xr-x   2 root root 4096 Jul 27 09:14 .
  3. drwxr-xr-x  21 root root 4096 Jul 27 09:15 ..
复制代码


All mount points seems disapppeared here.


It did happened on building LFS 6.0
  1. bash: /usr/bin/localedef: No such file or directory
复制代码



ending up installing "make localedata/install-locales" instead.


Started another console window.

[satimis@localhost ~]$ su
Password:
[root@localhost satimis]# which -a localedef
  1. /usr/bin/localedef
复制代码

[root@localhost satimis]# ls /mnt/
  1. cdrom  cdwriter  floppy  lfs  livecd
复制代码

mount points appeared here.

[root@localhost satimis]# ls /mnt/lfs/
  1. bin   dev  home  media  opt   root  sources  sys  tools  var
  2. boot  etc  lib   mnt    proc  sbin  srv      tmp  usr
复制代码


[root@localhost satimis]# su - lfs
lfs:~$ which -a localedef
  1. /tools/bin/localedef
  2. /usr/bin/localedef
复制代码

There are 2 here

Any advice.  TIA

B.R.
satimis
发表于 2005-7-28 16:22:54 | 显示全部楼层
chroot后,应该是 /bin/localedef 命令。
回复 支持 反对

使用道具 举报

发表于 2005-7-28 16:29:55 | 显示全部楼层
make[1]: *** [elf/subdir_install] Error 2
make[1]: Leaving directory `/sources/glibc-2.3.4'
make: *** [install] Error 2

make install 都出错了,,你的make没出错么?。。奇怪。。。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-7-28 16:50:14 | 显示全部楼层
Hi 黯然销魂

make[1]: *** [elf/subdir_install] Error 2
make[1]: Leaving directory `/sources/glibc-2.3.4'
make: *** [install] Error 2

make install 都出错了,,你的make没出错么?。。奇怪。。。。
No error on "make" but error popup on "make install"

Today repeated  6.11. Glibc-2.3.4
http://www.linuxfromscratch.org/ ... hapter06/glibc.html

After booting up the PC, performed following steps
- Removed both "glibc-2.3.4" and "glibc-build" on Konqueror as Root

Starting Console
[satimis@localhost ~]$ su
Password:
[root@localhost satimis]# export LFS=/mnt/lfs
[root@localhost satimis]# mount /dev/hda6 /mnt/lfs
[root@localhost satimis]# mkdir -p $LFS
[root@localhost satimis]# echo $LFS
/mnt/lfs
[root@localhost satimis]# mkdir -p $LFS/{proc,sys}
[root@localhost satimis]# mount -t proc proc $LFS/proc
[root@localhost satimis]# mount -t sysfs sysfs $LFS/sys
[root@localhost satimis]# mount -f -t tmpfs tmpfs $LFS/dev
[root@localhost satimis]# mount -f -t tmpfs tmpfs $LFS/dev/shm
[root@localhost satimis]# mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts
[root@localhost satimis]# /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 +h
I have no name!:/#      
I have no name!:/# exec /tools/bin/bash --login +h
root:/# mount -t devpts -o gid=4,mode=620 none /dev/pts

  1. mount: mount point /dev/pts does not exist
复制代码

root:/# mount -t devpts -o gid=4,mode=620 none /dev/pts

  1. mount: mount point /dev/pts does not exist
复制代码

root:/# mount -t tmpfs none /dev/shm

  1. mount: mount point /dev/shm does not exist
复制代码

Remark: -
Yesterday this part also having problem as follows; (referred to Notes)

- Notes -
root:/# mount -t devpts -o gid=4,mode=620 none /dev/pts

  1. warning: can't open /etc/fstab: No such file or directory
复制代码

root:/# mount -t devpts -o gid=4,mode=620 none /dev/pts

  1. mount: none already mounted or /dev/pts busy
  2. mount: according to mtab, none is already mounted on /dev/pts
复制代码

root:/# mount -t tmpfs none /dev/shm
The last command went through without complaint.  
- END -

Furthermore whether I need to repeat these 3 commands each time when booting up the PC ???

root:/# ls

  1. bin  boot  dev  etc  home  lib  media  mnt  opt  proc  root  sbin  sources  srv  sys  tmp  tools  usr  var
复制代码


Continued
root:/# cd sources/
root:/sources# ls | grep glibc
  1. glibc-2.3.4-fix_test-1.patch       glibc-2.3.4-fix_test-1.patch.rej   glibc-2.3.4.tar.bz2.orig
  2. glibc-2.3.4-fix_test-1.patch.orig  glibc-2.3.4.tar.bz2                glibc-2.3.4.tar.bz2.rej
复制代码


Remark:
I re-downloaded both "glibc-2.3.4-fix_test-1.patch" and "glibc-2.3.4.tar.bz2"
Re-named the old ones as .orig

glibc-2.3.4-fix_test-1.patch.rej
glibc-2.3.4.tar.bz2.rej
I have no idea how these files coming to existence.  I left them there.

root:/sources# tar xjf glibc-2.3.4.tar.bz2
root:/sources# cd glibc-2.3.4
root:/sources/glibc-2.3.4# patch -Np1 -i ../glibc-2.3.4-fix_test-1.patch
  1. patching file nptl/tst-cancel17.c
复制代码

root:/sources/glibc-2.3.4# mkdir ../glibc-build
root:/sources/glibc-2.3.4# cd ../glibc-build
root:/sources/glibc-build# ../glibc-2.3.4/configure --prefix=/usr \
> --disable-profile --enable-add-ons \
> --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc
root:/sources/glibc-build# make
  1. ....
  2. make[2]: Leaving directory `/sources/glibc-2.3.4/elf'
  3. make[1]: Leaving directory `/sources/glibc-2.3.4'
复制代码

root:/sources/glibc-build# make check
  1. ...
  2. ....
  3. g++: /dev/fd/63: No such file or directory
  4. g++: warning: `-x c++' after last input file has no effect
  5. g++: no input files
  6. g++: /dev/fd/63: No such file or directory
  7. g++: warning: `-x c++' after last input file has no effect
  8. g++: no input files
  9. g++: /dev/fd/63: No such file or directory
  10. g++: warning: `-x c++' after last input file has no effect
  11. g++: no input files
  12. make[1]: *** [/sources/glibc-build/c++-types-check.out] Error 1
  13. make[1]: Leaving directory `/sources/glibc-2.3.4'
  14. make: *** [check] Error 2
复制代码


Warning popup as before.  Referring to the Notes
  1. root:/sources/glibc-build# make check
  2. ....
  3. .....
  4. ......
  5. mv -f /sources/glibc-build/tls.makeT /sources/glibc-build/tls.make
  6. make[1]: Leaving directory `/sources/glibc-2.3.4'
  7. make[1]: Entering directory `/sources/glibc-2.3.4'
  8. make  -C csu tests
  9. make[2]: Entering directory `/sources/glibc-2.3.4/csu'
  10. make[2]: *** No rule to make target `/sources/glibc-build/csu/tst-empty.out', needed by `tests'.  Stop.
  11. make[2]: Leaving directory `/sources/glibc-2.3.4/csu'
  12. make[1]: *** [csu/tests] Error 2
  13. make[1]: Leaving directory `/sources/glibc-2.3.4'
  14. make: *** [check] Error 2
复制代码


Stopped here.

B.R.
satimis
回复 支持 反对

使用道具 举报

发表于 2005-7-29 03:19:18 | 显示全部楼层
/dev/shm
/dev/pts
之类的目录,要建立后再mount。。。

你的错误,我还没见过,看看谁有什么建议。。
回复 支持 反对

使用道具 举报

发表于 2005-7-29 03:58:11 | 显示全部楼层
总觉得你打patch的方式不对。。。。你说说你怎么打的。。。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-7-29 23:36:04 | 显示全部楼层
Hi 黯然销魂,

Problem solved

总觉得你打patch的方式不对。。。。你说说你怎么打的。。。。
Nothing  worong on this step.

Solution:
- removed glibc-2.3.4 and glibc-build
- after 'chroot' re-ran all commands on 6.8. Populating /dev
- reistalled glibc
that is all.

Now I came to another problem;

root:/sources/man-pages-2.01# cd ../glibc-build/
root:/sources/glibc-build# make -C ../glibc-2.3.4/linuxthreads/man

  1. make: *** ../glibc-2.3.4/linuxthreads/man: No such file or directory. Stop.
复制代码


'man' was not there.  I found;

/mnt/lfs/sources/linuxthreads/man

I don't know whether to change its path on running "make -C ../glibc-2.3.4/linuxthreads/man"

OR
to create a symbolic link

OR
I did some thing wrong

B.R.
satimis
回复 支持 反对

使用道具 举报

发表于 2005-7-30 01:29:32 | 显示全部楼层
did you extract the file linuxthread-xxxx.tar.bz2 in the glibc folder or somewhere else?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-7-30 07:12:37 | 显示全部楼层
Hi 黯然销魂,

did you extract the file linuxthread-xxxx.tar.bz2 in the glibc folder or somewhere else?
Checked my Notes.  No such step has been taken.  Please advise which Section on LFS 6.1 book.

Performed following test;
[satimis@localhost ~]$ su
Password:
[root@localhost satimis]# mount /dev/hda6 /mnt/lfs
[root@localhost satimis]# find /mnt/lfs -name linux | grep *.tar.bz2
No printout
[root@localhost satimis]# find /mnt/lfs -name linux -type d | grep linux

  1. /mnt/lfs/sources/linux-libc-headers-2.6.11.2/include/linux
  2. /mnt/lfs/sources/glibc-2.3.4/nptl/sysdeps/unix/sysv/linux
  3. /mnt/lfs/sources/glibc-2.3.4/sysdeps/unix/sysv/linux
  4. /mnt/lfs/sources/linuxthreads/sysdeps/unix/sysv/linux
  5. /mnt/lfs/sources/util-linux-2.12q/mkminix-0.1/linux
  6. /mnt/lfs/tools/include/linux
  7. /mnt/lfs/usr/include/linux
复制代码

[root@localhost satimis]# ls /mnt/lfs/sources/ | grep linux*

  1. glibc-linuxthreads-2.3.4.tar.bz2
  2. linux-2.6.11.12.tar.bz2
  3. linux-libc-headers-2.6.11.2
  4. linux-libc-headers-2.6.11.2.tar.bz2
  5. linuxthreads
  6. linuxthreads_db
  7. util-linux-2.12q
  8. util-linux-2.12q-cramfs-1.patch
  9. util-linux-2.12q.tar.bz2
复制代码

Could not find "linuxthread-xxxx.tar.bz2"

B.R.
satimis
回复 支持 反对

使用道具 举报

发表于 2005-7-30 13:14:31 | 显示全部楼层
http://www.linuxfromscratch.org/ ... hapter06/glibc.html

The linuxthreads tarball contains the man pages for the threading libraries installed by Glibc. Unpack the tarball from within the Glibc source directory:

tar -xjvf /sources/glibc-linuxthreads-2.3.5.tar.bz2


sorry, i missed the right name...
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表