Today I wanted to install nodejs on my debian machine, and I got stuck with strange errors about command not found. I hate to admit it, but it was the fault of strange CRLF and the fix was setting my git defaults to a sensible value:
git config --global core.autocrlf false
If you want the reasoning behind this, read http://code52.org/line-endings.html and then set it. But set it.