用file查询文件,有如下信息,可以看出是个32位的可执行文件。
file /opt/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-gcc
显示:
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.0, stripped
我们当前的系统是个64位的系统。从而导致了No such file or directory这个问题。
为了执行32位的程序,需要安装相应i386的底层库,如下所示。
sudo dpkg --add-architecture i386 sudo apt update sudo apt install libc6:i386 libncurses5:i386 libstdc++6:i386
再次执行原来的32位程序,这样就没有问题了。
参考文献
https://stackoverflow.com/questions/3949161/no-such-file-or-directory-but-it-exists
https://blog.csdn.net/solan8/article/details/115485622