我正在使用Vagrant和Oracle Virtual Machine在Windows上运行Django项目。问题是,当我尝试执行其中一个文件时,我遇到了错误:
-bash: /url_to_my_file: /bin/bash^M: bad interpreter: No such file or directory
我已经用Google搜索了问题,这是尝试的内容:
1)在Git Bash:
git config --global core.autocrlf false
git config core.autocrlf false
git config --global core.eol lf
git config core.eol lf
2)在Vagrant SSH Git:
git config --global core.autocrlf input
git config core.autocrlf input
git config --global core.eol lf
git config core.eol lf
3)将.gitattributes添加到Git项目主文件夹:
* text eol=lf
4)使用dos2win转换Vagrant VM内的所有文件(绝对措施):
find . -type f \! -path \*/\.svn/\* -exec dos2unix {} \;
仍然没有结果......可能有人可以帮忙吗?