I'm trying to install Homebrew on OS X El Capitan.
I used the following command to install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
So far it worked. But then if I tried to run any brew command, for example:
brew help
I got the error:
-bash: /usr/local/bin/brew: /bin/bash^M: bad interpreter: No such file or directory
So I tried both top answers of this thread (which sets the file format of brew to unix). Now, whatever brew command I run (e.g. brew doctor or brew help), I get:
: command not foundbrew.sh: line 2:
'usr/local/Library/brew.sh: line 3: syntax error near unexpected token `{
'usr/local/Library/brew.sh: line 3: `odie() {
How do I fix this syntax error so I'm finally able to use Homebrew? Thanks in advance for any advice!
EDIT: Clarifying.