東の森

centos6,mac忘備録備忘録

homebrew updateしていなかったでござるの巻

2ヶ月くらい前に入れたhomebrewを急に思い出す。そしてbrew doctorした。

$ brew doctor
Warning: Experimental support for using Xcode without the "Command Line Tools".
You have only installed Xcode. If stuff is not building, try installing the
"Command Line Tools for Xcode" package.
Warning: Your Homebrew is outdated
You haven't updated for at least 24 hours, this is a long time in brewland!
Error: Homebrew doesn't know what compiler versions ship with your version of
Xcode. Please file an issue with the output of `brew --config`:
  https://github.com/mxcl/homebrew/issues

Thanks!
Warning: Your compilers are different from the standard versions for your Xcode.
If you have Xcode 4.3 or newer, you should install the Command Line Tools for
Xcode from within Xcode's Download preferences.
Otherwise, you should reinstall Xcode.

xcodeに問題があるのかと思って見てみたら最新の4.5.1だったけど、/Developerの下の方でxcode3がいた。これが原因かなと思ったんだけど、書いてあるとおりhomebrewアップデートしていなかったからだし、コマンドラインツール入ってなかったからだった。どおりでbrew --configしてもxcodeが4.5.1だったはずだよ。この2点を解決しても

$ brew doctor
Warning: You have leftover files from an older version of Xcode.
You should delete them using:
  /Developer/Library/uninstall-developer-folder

がでた。警告だからたぶん何もしなくていいのだろうけど、とりあえずdoctorに言われたとおりに古いバージョンを消す。sudoが必要。

$ sudo /Developer/Library/uninstall-developer-folder

正常に戻りました。

$ brew doctor
Your system is raring to brew.