Created
July 17, 2014 06:07
-
-
Save bladelee/06838f34a1c2e64cc207 to your computer and use it in GitHub Desktop.
configure执行错误
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory | |
在Redhat AS5上编译安装某软件,输入命令./configure后,提示“bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory”。 | |
最后在网上查找了,分析认为此文件是在window下写的,所以在每行后面会加个ctrl+m就是^M,所以后面的sh就变成sh^M当然是没有这个命令的,所以脚本就不能运行了,把^M去掉就应该没问题了。 | |
输入命令:dos2unix configure 把它转化成linux文件。 | |
如果没有dos2unix此命令,可用此方法: | |
cat ./configure.sh | tr -d ‘\r’ > temp.sh | |
mv temp.sh configure.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment