MacBook Air に入っていた OS X Mountain Lion を OS X Mavericks にアップグレードしたら、 Homebrew でインストールしたコマンド類が動かなくなった(;´∀`)

まずは brew doctor コマンドで調査。


$ brew doctor
Warning: You are using Mac OS X 10.9.
We do not yet provide support for this (unreleased) version.
Error: Homebrew doesn't know what compiler versions ship with your version
of Xcode (5.1). Please `brew update` and if that doesn't help, file
an issue with the output of `brew --config`:
  https://github.com/mxcl/homebrew/issues
 
Thanks!
 
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`.

brew update したら、エラー発生(・_・;)


$ brew update
Error: undefined method `to_sym' for nil:NilClass
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/cmd/update.rb:103:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:101:in `each_line'
/usr/local/Library/Homebrew/cmd/update.rb:101:in `report'
/usr/local/Library/Homebrew/cmd/update.rb:23:in `update'
/usr/local/Library/brew.rb:95:in `send'
/usr/local/Library/brew.rb:95

もっかい brew doctor で診断。


$ brew doctor
Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:
 
    brew install openssl
 
Run `brew missing` for more details.
 
Warning: No developer tools installed.
You should install the Command Line Tools.
Run `xcode-select --install` to install them.

言われるままに、 openssl をインストール。


$ brew install openssl

言われるままに、 Command Line Tools をインストール。


$ xcode-select --install
xcode-select: note: install requested for command line developer tools

これで Homebrew が復活(*´ω`*)


$ brew doctor
Your system is ready to brew.

Homebrew でインストール済みの jhead と wget を実行しようとしたら実行パスに見つからず。。。


$ brew list
freetype	jhead		libpng		nkf		wget
imagemagick	jpeg		libtool		openssl
 
$ which jhead
 
$ which wget

ためしに jhead の FORMULA をアンインストールしてから、再度インストールしてみたら、実行できるようになった\(^o^)/


$ brew uninstall jhead
Uninstalling /usr/local/Cellar/jhead/2.97...
 
$ brew install jhead
==> Downloading http://www.sentex.net/~mwandel/jhead/jhead-2.97.tar.gz
######################################################################## 100.0%
==> make
  /usr/local/Cellar/jhead/2.97: 6 files, 124K, built in 2 seconds
 
$ which jhead
/usr/local/bin/jhead

また、 brew upgrade でアップデートされた FORMULA については、ちゃんと有効になっているぽい。ふぅ。

やっぱ、 Mac OS X のアップグレードをすると環境が壊れる。OS X のアップグレードをするときは時間に余裕のあるときにすべきかな。。。

tags: mac_os_x homebrew

Posted by NI-Lab. (@nilab)