这是我的问题。我刚刚tests在我的 VirtualBox VM 中编译了一个 linux 版本。当我运行它时,我得到:
bash: ./tests: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我做了一些研究,发现它可能是权限、缺少库或不同的架构。所以我检查了那些:
ls -al tests:
-rwxr-xr-x 1 me me 9948598 2011-02-21 01:54 tests
Run Code Online (Sandbox Code Playgroud)file tests
tests: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
Run Code Online (Sandbox Code Playgroud)uname -a
Linux DevBox 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:44 UTC 2011 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)ldd tests:
linux-vdso.so.1 => (0x00007fff7db90000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f10ef14c000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f10eee46000)
libz.so.1 => …Run Code Online (Sandbox Code Playgroud)