【Carthage】【brew】Carthageをインストール時に少しつまづいたのでメモ

brew install carthage

すると

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-core/issues

Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.

みたいな感じでエラーが出たので
brew/Troubleshooting.md at master · Homebrew/brew · GitHub
をみると

brew update

をしろと書いてあるのでしてみる。
そしたら

/usr/local/Library/ENV/scm/git: No such file or directory

と言われてしまう。
ググって
Homebrewでbrew updateしたら/usr/local/Library/ENV/scm/git: No such file or directoryと言われてしまう - Smoky God Express
を参考に

brew prune

をする(特に何も表示されなかった)。

そして、もう一回

brew update

すると

Error: /usr/local must be writable!

と出たのでググると以下の記事が。
素人がEl Capitanにアップデートしてみたやつ。 - Qiita

usr/local以下の権限を

sudo chown -R $(whoami):admin /usr/local

してあげて変更してあげればうまくいった。

OSがアップデートされる度にbrew系のコマンドがうまくいかなくなる気がする。