Homebrew インストール

estis2013/05/28 (火) 01:00 に投稿

RとRubyによるデータ解析入門 [ ソーション・チャン ]」の4ページ最終行には、
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
で、Homebrewがインストールできるとあるが、
-e:1: syntax error, unexpected ']'
[This script has been moved.][url]
^
estis-iMac3-895:~ estis$ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
-e:1: syntax error, unexpected ']'
[This script has been moved.][url]
^
とエラーになる。

ブラウザで、
https://raw.github.com/gist/323731
へアクセスすると
[This script has been moved.][url]

[url]:https://github.com/mxcl/homebrew/blob/master/Library/Contributions/install_homebrew.rb
と表示される。

しかし、
$ ruby -e "$(curl -fsSL https://github.com/mxcl/homebrew/blob/master/Library/Contributions/install_homebrew.rb)"
curl: (22) The requested URL returned error: 404
とこのURLもエラー。

結局
http://mxcl.github.io/homebrew/index_ja.html
へ辿り着いて
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
を実行。

==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/.
/usr/local/bin
/usr/local/include
/usr/local/lib
/usr/local/lib/pkgconfig
/usr/local/share
/usr/local/share/man
==> The following directories will have their group set to admin:
/usr/local/.
/usr/local/bin
/usr/local/include
/usr/local/lib/pkgconfig
/usr/local/share
/usr/local/share/man

Press ENTER to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin /usr/local/include /usr/local/lib /usr/local/lib/pkgconfig /usr/local/share /usr/local/share/man
Password:
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/. /usr/local/bin /usr/local/include /usr/local/lib/pkgconfig /usr/local/share /usr/local/share/man
==> Downloading and Installing Homebrew...
remote: Counting objects: 113331, done.
remote: Compressing objects: 100% (47713/47713), done.
remote: Total 113331 (delta 80938), reused 94134 (delta 64675)
Receiving objects: 100% (113331/113331), 16.23 MiB | 652 KiB/s, done.
Resolving deltas: 100% (80938/80938), done.
From https://github.com/mxcl/homebrew
* [new branch] master -> origin/master
HEAD is now at a377cad doctor: check git SSL settings on <= 10.5
Warning: Install the "Command Line Tools for Xcode": http://connect.apple.com
==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help

で成功。