2016年10月7日金曜日

macOS Sierra 10.12にアップデートしてhomebrewでエラーが出る

macOS Sierra 10.12にアップデートしましたが,

brew update
と入力すると
Error: /usr/local must be writable!
とエラーが出ます.
パーミッションの問題のようなので
sudo chown -R $(whoami):admin /usr/local
と入力してから再度
brew update
と入力してみます

brew update
/usr/local/Library/Homebrew/cmd/update.sh: line 6: /usr/local/Library/ENV/scm/git: No such file or directory
==> Homebrew has enabled anonymous aggregate user behaviour analytics
Read the analytics documentation (and how to opt-out) here:
  https://git.io/brew-analytics
Error: update-report should not be called directly!

と途中でエラーが出ちゃいましたが

brew update

ともう一度試してみると無事アップデートできて

Homebrew no longer needs to have ownership of /usr/local. If you wish you can
return /usr/local to its default ownership with:
  sudo chown root:wheel /usr/local

と表示されたので指示通り
sudo chown root:wheel /usr/local
でパーミッションを戻して解決したようです.

エラーが出た理由がよくわかりませんが,ま,,,うまくいけばいいか...



0 件のコメント: