【问题标题】:"No such file or directory" when running app on linux arm target在linux arm目标上运行应用程序时“没有这样的文件或目录”
【发布时间】:2013-12-28 07:29:14
【问题描述】:

我有一个开发套件(Altera Cyclon V,Cortex A9),我正在尝试在其上运行一个简单的应用程序。 我正在使用 cygwin 为 ARM Linux 交叉编译我的代码(对 Linux 使用 soureforge 工具链)。

步骤:

  1. 在 cygwin 中构建:arm-linux-gcc dd.c -s -mcpu=cortex-a9 -s -o ddb
  2. 将 ddb 复制到目标并 chmod a+x
  3. 运行它会给我“./ddb: No such file or directory”。 可能 lib\tools 之间不匹配,但我是 Linux 新手(来自 QNX)。

目标正在运行:

   root@socfpga:~/altera# cat /proc/version 
   Linux version 3.9.0 (jdasilva@sj-interactive3) (gcc version 4.7.3 20121106 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2012.1
   1-20121123 - Linaro GCC 2012.11) ) #1 SMP Fri Sep 27 22:55:43 PDT 2013

我的应用程序的文件数据:

 ddb: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared
 libs), for GNU/Linux 2.6.33, stripped

在目标上运行的示例 hello_world 的文件数据:

 hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (use
 s shared libs), for GNU/Linux 2.6.31, BuildID[sha1]=0x2e8fbebd0bdab5897c0c65fb6b
 563f3c34a16eb1, stripped

我可以看到正在使用不同的 DLL(2.6.31 与 2.6.33)。

我该如何解决这个问题?

【问题讨论】:

  • 好的,通过使用 Linaro GCC(用于构建目标)修复它

标签: linux gcc intel-fpga


【解决方案1】:

我之前尝试将 ARM 二进制文件复制到 ARM android 设备时遇到过这个问题。

你解决了它,但不管怎样,这就是我发现的。问题是共享库。它正在尝试加载目标上不存在的库。 “找不到文件”错误非常具有误导性。

相关问答:

"No such file or directory" but it exists

【讨论】:

    【解决方案2】:

    可能是 6432 位问题。 见this

    【讨论】:

      猜你喜欢
      • 2020-08-11
      • 1970-01-01
      • 2016-08-15
      • 1970-01-01
      • 1970-01-01
      • 2022-07-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多