0

I am trying to build Linux from Scratch per LFS website

While I was able to install all the packages until 6.7.1 without any error, I am stuck at Installation of Linux API headers (This is after I chroot into the installation) with the error,

/bin/sh: /tools/bin/sed: No such file or directory

Now I checked if, the file exists and I found it does.

ls -all /tools/bin/sed
-rwxr-xr-x 1 root root 260350 Aug  7 20:27 /tools/bin/sed

exists in the installation, and I found it does.

If I try executing sed, I get the error.

/bin/sh: /tools/bin/sed: No such file or directory

Trying to find the type of file sed is, I get

file /tools/bin/sed
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.24 

I notice that the for part in sed is different from other files in /tools/bin which have for GNU/Linux 2.6.25

What am I missing here?

veepsk
  • 101
  • I have seen similar problems before with other tools, not specifically sed. It turns out that /bin/sh itself is the problem. It may be a symlink to a missing file or something... try file /bin/sh and try to replace it with a link for /bin/bash – Bichoy Aug 08 '13 at 02:56
  • If you exit the chroot, can you use it as normal? – Kevin Aug 08 '13 at 03:10
  • 1
    This usually means that there is a linked library missing. Check the output of ldd /tools/bin/sed. – jordanm Aug 08 '13 at 03:25
  • Possibly wrong path to the dynamic linker in that sed file? – Stéphane Chazelas Aug 08 '13 at 04:37
  • @kevin, As normal user, I can use sed from the installation. – veepsk Aug 08 '13 at 05:08
  • @jordanm : ldd /tools/bin/sed linux-vdso.so.1 => (0x00007fff914be000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2842798000) /lib64/ld-linux-x86-64.so.2 (0x00007f2842b71000)

    This is what I get, my guess is I am missing the symlink for the last file ?

    – veepsk Aug 08 '13 at 05:14

1 Answers1

0

@Bichoy: You were right, the problem was with bash, My /bin/sh was a symlink to dash instead of /bin/bash

Changed shell and I am all set to proceed with building linux.

veepsk
  • 101