gpt4 book ai didi

linux - 在 Linux (Ubuntu) 中,当我看到 "No such file or directory"时如何确定未找到哪个特定文件

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:53:37 30 4
gpt4 key购买 nike

在 Ubuntu 中,我给出了这些命令并获得了这个输出:

soujanya@LLN-Ubuntu:~/workspace/openEAR-0.1.0$ ls -l SMILExtract
-rwxr-xr-x 1 soujanya soujanya 3789876 Aug 20 2009 SMILExtract
soujanya@LLN-Ubuntu:~/workspace/openEAR-0.1.0$ whoami
soujanya
soujanya@LLN-Ubuntu:~/workspace/openEAR-0.1.0$ ./SMILExtract
bash: ./SMILExtract: No such file or directory
soujanya@LLN-Ubuntu:~/workspace/openEAR-0.1.0$

SMILExtract 是一个可执行文件(不是 shell 脚本),我无权访问该文件的源代码。也许它调用了一些 system() 或者也许没有,我无从知晓。

我听说这个错误可能是如果文件是 32 位的,而我在 64 位系统上运行它,所以 No such file or directory 指的是加载器而不是这个文件.我认为这不是我的原因,但无论如何,我的问题是:

有没有办法找出哪个文件是No such file or directory?也许是 Bash 中的特殊变量或类似的东西。

最佳答案

您可以使用 strace 运行程序,这是一种显示程序使用了哪些系统调用的工具。它会产生大量输出,但您可以看到您的程序试图打开的文件。像这样运行你的程序:

strace ./SMILExtract

关于linux - 在 Linux (Ubuntu) 中,当我看到 "No such file or directory"时如何确定未找到哪个特定文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24882218/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com