2

I am using Vagrant and Oracle Virtual Machine to run a Django project on Windows. The problem is that when I try to execute one of the file, I've got an error:

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

I've already Googled for the problem is here what was tried:

1) At 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) At 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) Added .gitattributes to Git project main folder:

* text eol=lf

4) Used dos2win to convert all files inside Vagrant VM (desparate measure):

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

Still no result... may be someone can help with this?

0leg
  • 13,464
  • 16
  • 70
  • 94
  • 1
    the Ctrl-M is the Windows carriage-return char. If `bash` is complaining about it, you need to process the script that is being run with `dos2unix scriptWithCtrl-M_Error`. Keep a backup of your original just in case ;-) Good luck. – shellter Sep 26 '14 at 17:21

1 Answers1

1

I suspect your files are already checked in with 'CRLF` line endings.

You might need to normalize the line endings in your repository.

(See https://stackoverflow.com/a/1511273/537554).

Community
  • 1
  • 1
ryenus
  • 15,711
  • 5
  • 56
  • 63
  • The answer in the link solved the problem. After 2 days of struggle it finally works.. thank you! – 0leg Sep 29 '14 at 07:48