linux可执行文件bad interpreter解决方法
来源:互联网 发布:cf外设软件下载 编辑:程序博客网 时间:2024/06/03 18:48
经常会遇到这种情况,在windows下写的脚本,代码会在linux下无法执行,错误就是:
: bad interpreter: No such file or directory
以前一直不知怎么解决,今天终于找到方法了。
1 原因
这通常都是由于windows下对文本文件的保存格式与unix下不同造成的,windows下回车的字符是’\r\n’,而linux下是’\n’。
2 解决方法
vi file
在命令模式下,输入 :set ff?
查看文件格式为dos或者unix
:set ff=unix
:wq
保存退出,即可。
更多文章请点击熊猫TEAM
0 0
- linux可执行文件bad interpreter解决方法
- linux可执行文件bad interpreter解决方法
- ^M: bad interpreter:解决方法
- Linux 下执行指令出现“bad interpreter”错误的解决方法
- Linux 下执行指令出现“bad interpreter”错误的解决方法
- Linux 下执行指令出现“bad interpreter”错误的解决方法
- sh^M:bad interpreter:解决方法
- linux可执行文件错误:异常/bin/sh^M: bad interpreter: No such file or dire
- /bin/sh^M: bad interpreter的解决方法
- /bin/sh^M: bad interpreter的解决方法
- CentOS /bin/bash^M: bad interpreter解决方法
- linux shell编程:/bin/bash^M bad interpreter:没有那个文件或目录解决方法
- Linux执行shell出现错误bad interpreter: No such file or directory解决方法
- linux shell编程:/bin/bash^M bad interpreter:没有那个文件或目录解决方法
- arm-linux交叉编译bad ELF interpreter
- bad interpreter: No such file or directory 解决方法
- bad interpreter: 没有那个文件或目录 解决方法
- CentOS6 Shell脚本/bin/bash^M: bad interpreter错误解决方法
- intellij idea build时出现illegal character的解决
- 杭电2007
- CPU 内存 硬盘 使用率统计shell
- oracle笔记
- 鍵值對
- linux可执行文件bad interpreter解决方法
- SQL函数说明大全
- hdu-----1003-----Max Sum
- expdp ,impdp 参数
- CAGradientLayer简介
- 索(shen)引(keng)大全
- MySql错误代码1045的解决方案
- 更改VS添加C++头文件(.h)和源文件(.cpp)时默认的文件格式和内容
- 本人写的如何使用DFS API 合并为一个大的天气数据文件