homebrewが原因でgitが使えなくなったときの対処法


何が起きたか

homebrew install <hoge>

の実行後に、homebrew で入れたgitで以下のエラーが発生するようになってしまった。

~/code ❯❯❯ git                                                                                        ✘ 130
dyld: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
  Referenced from: /usr/local/bin/git
  Reason: image not found
[1]    19406 abort      git

解決策

brew uninstall --force gettext
brew install gettext

参考文献