开发者

GNU Make can never find perl?

开发者 https://www.devze.com 2023-03-12 19:20 出处:网络
I sometimes get this error when compiling a program: make[1]: /usr/bin/perl: Command not found make[1]: *** [links] Error 127

I sometimes get this error when compiling a program:

make[1]: /usr/bin/perl: Command not found
make[1]: *** [links] Error 127

This happens with any program that requires perl to compile, such as openssl and automake. However:

sh-2.05b# perl -v

This is perl, v5.10.0 DEVEL34342 built for arm-linux-thread-mu开发者_Go百科lti
(with 1 registered patch, see perl -V for more detail)

sh-2.05b# /usr/bin/perl -v

This is perl, v5.10.0 DEVEL34342 built for arm-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)

I definitely have perl installed. What's going on?


If this is reproducible, run the make command with strace -f, to see unambiguously which command is attempting (and failing) to exec.

I can recall from my own experience the following two situations in which an exec-family might fail on Linux with ENOENT despite that the command is actually there:

  1. The .interp referred to by the binary isn't present (example: the LSB-compatible binary refers to /lib/ld-lsb.so.3 instead of the usual /lib/ld-linux.so.2, and LSB compatibility packages haven't been installed on the Linux machine). Seems unlikely in your scenario :)
  2. Some kernel-level non-standard security mechanism is in place which is blocking execution of the binary - especially on locked-down embedded devices. One would think EACCES would be the more logical errno in this case, but maybe ENOENT is used to prevent leaking information about the existence of binaries to unprivileged processes.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号