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?

marked as duplicate by Gilles, slm, jasonwryan, user26112, Anthon Aug 9 '13 at 5:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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 8 '13 at 2:56
  • If you exit the chroot, can you use it as normal? – Kevin Aug 8 '13 at 3:10
  • 1
    This usually means that there is a linked library missing. Check the output of ldd /tools/bin/sed. – jordanm Aug 8 '13 at 3:25
  • Possibly wrong path to the dynamic linker in that sed file? – Stéphane Chazelas Aug 8 '13 at 4:37
  • @kevin, As normal user, I can use sed from the installation. – veepsk Aug 8 '13 at 5:08
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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.