macOS Sierraへのアップグレード以前からインストールされていたbrewを更新する
2249 ワード
問題
macOS Sierra以前のEl Capitanなどでbrewをインストールし、クリーンインストールではなく上書きインストールした場合、brew update
を実行しようとするエラーが発生してしまう。
$ brew --version
Homebrew 1.1.9-131-gcf18a99
Homebrew/homebrew-core (git revision bdf98; last commit 2016-04-30)
$ brew update
Error: /usr/local must be writable!
解決法
brew doctor
の指示に従って/usr/local
のオーナーをsudo chown -R $(whoami) /usr/local
で一時的に変更してbrew update
を実行し、実行後にsudo chown root:wheel /usr/local
でオーナーを元に戻す。
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: /usr/local is not writable.
You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami) /usr/local
$ brew update
Updating Homebrew...
==> Auto-updated Homebrew!
(中略)
==> Migrated HOMEBREW_REPOSITORY to /usr/local/Homebrew!
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
Author And Source
この問題について(macOS Sierraへのアップグレード以前からインストールされていたbrewを更新する), 我々は、より多くの情報をここで見つけました https://qiita.com/mayfair/items/156b866b76ce3a8950cc著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .