homebrewでのXcodeのライセンスエラー
pipコマンドが効かない、easy_installコマンドが効かない、pyenvが入ってない、という流れでbrew install pyenvをしようとしたら「You have not agreed to the Xcode license.」というメッセージが出てしまった。
brew doctorした際にXQuartzをアップデートせよ、とのメッセージが出たため、XQuartzをアップデートしたのだが、それが原因で下記メッセージが出てしまっているらしい。
Warning: You have not agreed to the Xcode license.
Builds will fail! Agree to the license by opening Xcode.app or running:
xcodebuild -license
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Warning: You have an outdated version of /usr/bin/install_name_tool installed.
This will cause binary package installations to fail.
This can happen if you install osx-gcc-installer or RailsInstaller.
To restore it, you must reinstall OS X or restore the binary from
the OS packages.
Xcodeを立ち上げて、ライセンスに同意する。

ライセンスに同意後、下記画面が表示される。

これでbrewコマンド時にライセンスエラーが出なくなる。