Trying to install Homebrew: miscellaneous errors returned

守給你的承諾、 提交于 2019-12-11 08:54:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!