the glue

やってみたことで忘れそうなこと、役立ちそうなことなどをまとめています。たまに何気ない日常の話もします。

HomebrewユーザーのOS X Yosemite へのアップデート

特に何の対策もせずYosemiteへのアップデートを行いました。

残り2分 と表示されたまま1時間以上が経過したのでログを見てみると、どうやらインストーラが /usr/local 以下を全部移動している模様。 LATEXやHomebrewを使っている人は苦しんだことでしょう。(私はどちらも)
アップデートには異常に時間がかかりましたが、その後は正常に起動しました。

ところでHomebrewは生きているのか

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Your Xcode (6.0.1) is outdated
Please update to Xcode 6.1.
Xcode can be updated from the App Store.

Warning: Your Homebrew is outdated.
You haven't updated for at least 24 hours. This is a long time in brewland!
To update Homebrew, run `brew update`.

二つほどWarningが出ているようです。
Xodeのバージョンが古いと言われていますが、現在正式リリースされているもので最新版はXcode 6.0.1です。 まずは書いてある通りにXcodeを起動して、Componentsを有効化しましょう。 その後 brew updateをしましょう。

$ brew update && brew upgrade
...
...
...
==> Upgrading ruby
==> Downloading http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.3.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/ruby/2.1.3_1 --enable-shared --disable-silent-rules --with-sitedir=/usr/local/lib/ruby/site_ruby --with-vendordir=/usr/local/lib/ruby/vendor_ruby --with-out-ext=tk --disable-install-doc --disable
==> make
==> make install
    from ./tool/rbinstall.rb:789:in `call'
    from ./tool/rbinstall.rb:789:in `block in <main>'
    from ./tool/rbinstall.rb:786:in `each'
    from ./tool/rbinstall.rb:786:in `<main>'
make: *** [do-install-nodoc] Error 1

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting

These open issues may also help:
Ruby 2.1.3 failed to build on OSX 10.9 (https://github.com/Homebrew/homebrew/issues/32910)

rubyで怒られました。
どうやら、まだ正式リリースされていないXcode 6.1に含まれるYosemite用のComponentsが必要なようです。 現状どうにもならないので、rbenvで対応しておくのが良いようです。

# rubyをアンインストール
$ brew remove ruby
# rbenv をインストール
$ brew install rbenv
# rbenvで2.1.3をインストール
$ rbenv install 2.1.3

Downloading ruby-2.1.3.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/0818beb7b10ce9a058cd21d85cfe1dcd233e98b7342d32e9a5d4bebe98347f01
Installing ruby-2.1.3...
Installed ruby-2.1.3 to /usr/local/var/rbenv/versions/2.1.3
$ /usr/local/var/rbenv/versions/2.1.3/bin/ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin14.0]

インストールできました。