LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   bash: /usr/bin/localedef: No such file or directory (https://www.linuxquestions.org/questions/linux-from-scratch-13/bash-usr-bin-localedef-no-such-file-or-directory-347290/)

satimis 07-27-2005 09:59 AM

bash: /usr/bin/localedef: No such file or directory
 
Hi folks,

LFS 6.1

Moved on to

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

<snip>

root:/sources/glibc-build# make check
Code:

...
.....
mv -f /sources/glibc-build/tls.makeT /sources/glibc-build/tls.make
make[1]: Leaving directory `/sources/glibc-2.3.4'
make[1]: Entering directory `/sources/glibc-2.3.4'
make  -C csu tests
make[2]: Entering directory `/sources/glibc-2.3.4/csu'
make[2]: *** No rule to make target `/sources/glibc-build/csu/tst-empty.out', needed by `tests'.  Stop.
make[2]: Leaving directory `/sources/glibc-2.3.4/csu'
make[1]: *** [csu/tests] Error 2
make[1]: Leaving directory `/sources/glibc-2.3.4'
make: *** [check] Error 2

root:/sources/glibc-build# touch /etc/ld.so.conf
root:/sources/glibc-build# make install
Code:

...
......
make[4]: Entering directory `/sources/glibc-2.3.4/stdlib'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/sources/glibc-2.3.4/stdlib'
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'
make[4]: Entering directory `/sources/glibc-2.3.4/string'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/sources/glibc-2.3.4/string'
make -C ../time objdir=/sources/glibc-build -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-setitimer.os'
make[4]: Entering directory `/sources/glibc-2.3.4/time'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/sources/glibc-2.3.4/time'
make[3]: Leaving directory `/sources/glibc-2.3.4/elf'
make[2]: *** No rule to make target `/sources/glibc-build/dlfcn/libdl.so.2', needed by `/sources/glibc-build/elf/sprof'.Stop.
make[2]: Leaving directory `/sources/glibc-2.3.4/elf'
make[1]: *** [elf/subdir_install] Error 2
make[1]: Leaving directory `/sources/glibc-2.3.4'
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
Code:

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
Code:

bash: /usr/bin/localedef: No such file or directory
root:/sources/glibc-build# localedef -i en_HK -f ISO-8859-1 en_HK
Code:

bash: /usr/bin/localedef: No such file or directory
root:/sources/glibc-build# which localedef
Code:

bash: which: command not found
root:/sources/glibc-build# ls -al /mnt/
Code:

total 12
drwxr-xr-x  2 root root 4096 Jul 27 09:14 .
drwxr-xr-x  21 root root 4096 Jul 27 09:15 ..

Al mount points seems disapppeared here.


It did happened on building LFS 6.0
Code:

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
Code:

/usr/bin/localedef
[root@localhost satimis]# ls /mnt/
Code:

cdrom  cdwriter  floppy  lfs  livecd
mount points appeared here.

[root@localhost satimis]# ls /mnt/lfs/
Code:

bin  dev  home  media  opt  root  sources  sys  tools  var
boot  etc  lib  mnt    proc  sbin  srv      tmp  usr

[root@localhost satimis]# su - lfs
lfs:~$ which -a localedef
Code:

/tools/bin/localedef
/usr/bin/localedef

There are 2 here

Any advice. TIA

B.R.
satimis

kjordan 07-27-2005 11:59 AM

The reason the mount points didn't show is because you're in the chroot environment, so your / for that environment would be equivalent to /mnt/lfs in your regular environment. My guess would be that localedef isn't in /usr/bin in your chroot environment because your make install wasn't successful.

satimis 07-28-2005 01:53 AM

Hi kjordan,

Quote:

The reason the mount points didn't show is because you're in the chroot environment, so your / for that environment would be equivalent to /mnt/lfs in your regular environment
Noted with tks.

Quote:

My guess would be that localedef isn't in /usr/bin in your chroot environment because your make install wasn't successful.
Repeated 6.11. Glibc-2.3.4
http://www.linuxfromscratch.org/lfs/...r06/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
Code:

mount: mount point /dev/pts does not exist
root:/# mount -t devpts -o gid=4,mode=620 none /dev/pts
Code:

mount: mount point /dev/pts does not exist
root:/# mount -t tmpfs none /dev/shm
Code:

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
Code:

warning: can't open /etc/fstab: No such file or directory
root:/# mount -t devpts -o gid=4,mode=620 none /dev/pts
Code:

mount: none already mounted or /dev/pts busy
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
Code:

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
Code:

glibc-2.3.4-fix_test-1.patch      glibc-2.3.4-fix_test-1.patch.rej  glibc-2.3.4.tar.bz2.orig
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
Code:

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
Code:

....
make[2]: Leaving directory `/sources/glibc-2.3.4/elf'
make[1]: Leaving directory `/sources/glibc-2.3.4'

root:/sources/glibc-build# make check
Code:

...
....
g++: /dev/fd/63: No such file or directory
g++: warning: `-x c++' after last input file has no effect
g++: no input files
g++: /dev/fd/63: No such file or directory
g++: warning: `-x c++' after last input file has no effect
g++: no input files
g++: /dev/fd/63: No such file or directory
g++: warning: `-x c++' after last input file has no effect
g++: no input files
make[1]: *** [/sources/glibc-build/c++-types-check.out] Error 1
make[1]: Leaving directory `/sources/glibc-2.3.4'
make: *** [check] Error 2

Warning popup as before. Referring to the Notes
Code:

root:/sources/glibc-build# make check
....
.....
......
mv -f /sources/glibc-build/tls.makeT /sources/glibc-build/tls.make
make[1]: Leaving directory `/sources/glibc-2.3.4'
make[1]: Entering directory `/sources/glibc-2.3.4'
make  -C csu tests
make[2]: Entering directory `/sources/glibc-2.3.4/csu'
make[2]: *** No rule to make target `/sources/glibc-build/csu/tst-empty.out', needed by `tests'.  Stop.
make[2]: Leaving directory `/sources/glibc-2.3.4/csu'
make[1]: *** [csu/tests] Error 2
make[1]: Leaving directory `/sources/glibc-2.3.4'
make: *** [check] Error 2

Stopped here.

B.R.
satimis


All times are GMT -5. The time now is 09:43 PM.