I recently had a mishap with MySQL and when I uninstalled it from System Preferences it uninstalled Homebrew as well (I checked the erase all files that are related to MySQL, which was probably not the right thing to do).

Anyways, I got everything back to normal but when I try to install Homebrew using the install script on their website:

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

I get this error:

fish: $(...) is not supported. In fish, please use '(curl)'.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

I tried complying with this error by eliminating the '$' and running:

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

I then get this error:

-e:1: syntax error, unexpected tLABEL, expecting keyword_do or '{' or '('
(curl -fsSL https://raw.githubusercontent.com/H...
-e:1: unknown regexp options - raw

This is where I am stuck. I've tried to change my shell but fish is the only one listed in my shell files.

  • What is your os? – mohammad moeini May 22 '19 at 17:49
  • MacOS using iterm2 and fish shell – WaterTrash May 22 '19 at 20:33

Your second example just begins with (curl.... Which doesn't make any sense. Typo? This should work:

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

Also, you could also just run curl and save the script to a file (e.g., homebrew.rb) then tell ruby to execute that script: ruby homebrew.rb.

| improve this answer | |
  • Shoot, I'm sorry, that is a typo. I edited the command to the correct one. – WaterTrash May 22 '19 at 20:29
  • Could you elaborate on the second part? When I run curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install I get a bunch of output and can't locate a homebrew.rb file. – WaterTrash May 22 '19 at 20:32
  • @WaterTrash your edit still says /usr/bin/ruby -e "$(curl... which is not valid fish syntax. Did you try the command I put in my answer? No quotes. No dollar-sign. As for using curl separate from ruby you need to tell curl to save the output: curl -o homebrew.rb .... – Kurtis Rader May 22 '19 at 20:57
  • Yes, I ran your command and there is no output at all. When I add -o I get: /usr/bin/ruby -e (curl -o -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 12427 100 12427 0 0 14788 0 --:--:-- --:--:-- --:--:-- 14776 /usr/bin/ruby: no code specified for -e (RuntimeError) – WaterTrash May 23 '19 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.