Homebrew のエラー

いつものように Homebrew をアップデートしようとすると以下のようなエラーが吐き出されました。

Warning: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.

You should probably change the ownership and permissions of /usr/local
back to your user account.

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`.

なので調べてみると

$ ls -lad /usr/local
drwxr-xr-x  17 root  wheel  578  2  3 06:02 /usr/local

とのこと。では、所有者をユーザーに替えてみる

$ sudo chown -R `whoami` /usr/local
$ ls -lad /usr/local
drwxr-xr-x  18 userName  wheel  612  3  1 02:55 /usr/local

すると、今度は違うエラーが吐き出される

Warning: You have uncommitted modifications to Homebrew
If this a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
    cd /usr/local/Library && git stash && git clean -d -f

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`.

エラー内容の指示に従って

$ cd /usr/local/Library && git stash && git clean -d -f
$ brew update

を実行してすべて解決!

先日の OS X Mavericks 10.9.2 アップデートで書き変わっちゃったのかな。

コメントを残す