用file查询文件,有如下信息,可以看出是个32位的可执行文件。
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=945a3f39d6b21bc7f57eec2644930a3900047448, with debug_info, not stripped
我们当前的系统是个64位的系统。从而导致了No such file or directory这个问题。
为了执行32位的程序,需要安装相应i386的底层库,如下所示。
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
再次执行原来的32位程序,这样就没有问题了。
参考文献
https://stackoverflow.com/questions/3949161/no-such-file-or-directory-but-it-exists
在64位系统中尝试执行32位ELF可执行文件时遇到错误,因为缺少必要的32位库。要解决此问题,需要通过`dpkg`添加32位架构支持,然后安装如`libc6:i386`等关键32位库。完成这些步骤后,32位程序即可正常运行。
4186

被折叠的 条评论
为什么被折叠?



