Search code examples
homebrewosx-snow-leopard

Installing brew on Mac 10.6 results in syntax error


Running the following command from http://brew.sh/:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

...result in:

-e:192: syntax error, unexpected '.', expecting $end .map { |d| File.join(HOMEBREW_PREFIX, d) } ^

I'm using zsh on Mac OS 10.6.


Solution

  • The official homebrew install command use some bashism. The easiest way to solve this is to run the homebrew install command with bash -c in front of it :

    bash -c '/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"'