2014-09-26 92 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

回答

相關問題