转:/bin/bash^M: bad interpreter: No such file or directory

时间:2017-08-25 13:20:06   收藏:0   阅读:244

执行一个脚本full_build.sh 时, 一直是提示我:

-bash: ./full_build.sh: /bin/bash^M: bad interpreter: No such file or directory

 

一般造成这个问题的原因是文本格式为Dos,不是unix造成的

通过vim打开文件,使用命令:set ff?  查看文本格式是否为unix,如果不是通过:set ff=UNIX强制转换文件格式。最后:wq保存退出

原文:http://www.cnblogs.com/happyliuyi/p/7427281.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!