-bash: ***: No such file or directory 错误原因总结

-bash: ***: No such file or directory

这个错误,原因无从找起,只能靠经验

 

1. bash script出现该错误:

原因:因为script在传输过程中变成了dos格式

Solution: $ dos2unix sheel.sh

 

 

2. 在一台新装的机上莫名出现了该错误

Reason: 在一台64位的机器上装了64bit版的ubuntu,使得原来的32bit rpm包不能使用

Description:

把其他机器上的程序copy过来也不能直接用

$ ./gcc
-bash: ./gcc: No such file or directory
$ scp ***tmp/a.out ./
a.out                                                            100% 9037     8.8KB/s   00:00
$ ./a.out
-bash: ./a.out: No such file or directory
After install ia32-libs
$ ./a.out
sync
abc

Solution:

sudo
 apt-get
 install
 ia32-libs

 

AMD64参考:

http://maketecheasier.com/run-32-bit-apps-in-64-bit-linux/2009/08/10

http://www.debian-administration.org/articles/534

你可能感兴趣的:(-bash: ***: No such file or directory 错误原因总结)