Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 866
egor.ananyev Avatar asked Oct 24 '16 07:10

egor.ananyev


Video Answer


2 Answers

ok so to install manually through terminal do

$ cd /usr/local

$ mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew

then you need to change your bash_profile like this:

$ echo 'export PATH="/usr/local/homebrew/bin:$PATH"' >> ~/.bash_profile

you might need to change permissions to the homebrew folder as well:

$ sudo chown -R $(whoami) /usr/local/homebrew

this worked for me

like image 66
Jonathan Chases Sleek Mink Avatar answered Oct 14 '22 20:10

Jonathan Chases Sleek Mink


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)"'
like image 34
Ortomala Lokni Avatar answered Oct 14 '22 20:10

Ortomala Lokni