2014-09-26 85 views
2

我正在使用Vagrant和Oracle虚拟机在Windows上运行Django项目。问题是,当我尝试执行该文件中的一个,我得到了一个错误:在Windows 7上通过Vagrant运行Django时发生CRLF问题

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

我已经用谷歌搜索的问题是在这里发生了什么尝试:

1)在混帐击:

git config --global core.autocrlf false 
git config core.autocrlf false 
git config --global core.eol lf 
git config core.eol lf 

2)在流浪SSH混帐:

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项目主文件夹:用于dos2win转换流浪VM(绝望的措施)下的所有文件

* text eol=lf 

4):

find . -type f \! -path \*/\.svn/\* -exec dos2unix {} \; 

仍然没有结果......可能有人能帮助呢?

+1

Ctrl-M是Windows回车符。如果'bash'抱怨它,你需要处理正在用'dos2unix scriptWithCtrl-M_Error'运行的脚本。保留原件的备份以防万一;-)祝你好运。 – shellter 2014-09-26 17:21:23

回答

相关问题