“ -sh:executable_path:未找到”是什么意思

我试图在linux shell中运行可执行文件(在raspberry pi上为OpenELEC)

OpenELEC:~ # /storage/fingi/usr/lib/autossh/autossh

-sh: /storage/fingi/usr/lib/autossh/autossh: not found

在这种情况下,“未找到”是什么意思?

如果我尝试做ldd:

OpenELEC:~ # ldd  /storage/fingi/usr/lib/autossh/autossh

/usr/bin/ldd: eval: line 1: /storage/fingi/usr/lib/autossh/autossh: not found

如果我要归档:

OpenELEC:~ # file /storage/fingi/usr/lib/autossh/autossh

/storage/fingi/usr/lib/autossh/autossh: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=599207c47d75b62ede5f214f9322ae2a18643eb7, stripped

文件类型为正确格式。但是它也不会工作,也不会给出更多描述性错误。

由于openELEC的限制非常严格,因此我从raspbmc安装程序中复制了autossh可执行文件。我也为其他几个可执行文件(屏幕,boost库等)完成了这些任务,它们工作正常。

谁能建议可能是什么问题?

编辑1:如建议的那样,这是正在运行的可执行文件(也从raspbmc复制的)上的file命令的输出:

OpenELEC:~ # file /storage/fingi/usr/bin/screen

/storage/fingi/usr/bin/screen: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=5c58f047a25caa2c51a81d8285b4f314abc690e7, stripped

回答:

在这种情况下,“未找到”是什么意思?

这通常意味着可执行文件无法找到一个或多个(共享)库来满足其外部符号。

当initramfs中没有存储任何库,或者缺少可执行文件所需的共享库时,通常会发生这种情况。

如果可执行文件是使用与运行时库不兼容的C库构建的,例如uClibc vs glibc / eglibc,也会发生这种情况。

strings executable | less是查看可执行文件所需的必需库和外部符号的最快方法。

或重新

编译程序,并通过指定-static选项使用静态链接。

以上是 “ -sh:executable_path:未找到”是什么意思 的全部内容, 来源链接: utcz.com/qa/403657.html

回到顶部