gotagota日記

「面白きことは良きことなり」

homebrew update したら Error: Failed to update tap: homebrew/dupes って出たので解消した

おもむろに homebrew をアップデートしようとしたら、唐突にエラーが出たのでその解消法を。

$ brew update

エラーメッセージは以下。

error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
Error: Failed to update tap: homebrew/dupes

なにやらパーミッションの問題で、 homebrew/dupes (?) がアップデートできないらしい。

とりあえず、 homebrew/dupes のありかを探して
$ sudo find / -name homebrew-dupes

移動します。
$ cd /usr/local/Library/Taps/homebrew/homebrew-dupes

強制的に リモートリポジトリから引っ張ってきます。
$ git co .
$ sudo git pull --force

で、homebrew をアップデート。
$ brew update

どや!

Already up-to-date.

ふう。
簡単ではありましたが、以上です。

参考URL