问题
My platform is OSX 10.7.5. Ruby version is ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-darwin11.4.2]
I am attempting to install Homebrew — to no avail. Here is what I tried so far from the Terminal:
1) Command copied from http://brew.sh/
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
This brings up the message
-e:192: syntax error, unexpected '.', expecting $end
.map { |d| File.join(HOMEBREW_PREFIX, d) }
^
2) From SO Error when installing homebrew with ruby I also tried (a)
ruby -e "$(curl -fsSL raw.github.com/mxcl/homebrew/go)"
and was returned
curl: (22) The requested URL returned error: 404
and (b)
/usr/bin/ruby -e "$(curl -fsSL https://github.com/mxcl/homebrew/blob/master/Library/Contributions/install_homebrew.rb)"
resulting in
curl: (22) The requested URL returned error: 404
(a) and (b) both return class 4xx http Client errors.
I would be grateful if anyone could help.
回答1:
Try updating ruby using rvm to 2.*...
Otherwise, try downloading the script and then running it separately:
$ curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install > brew_install.rb
$ ruby brew_install.rb
来源:https://stackoverflow.com/questions/40214331/trying-to-install-homebrew-miscellaneous-errors-returned