LoginSignup
0
0

More than 5 years have passed since last update.

ターミナルでsudoでも実行できなかった際の対処法

Last updated at Posted at 2018-01-13

homebrewでphpのバージョンを7にあげようとしたら、Error: The /usr/local directory is not writable.が出てできなかった。
理由はmacのセキュリティ上の設定のせいだったらしい。

参考:
https://qiita.com/bohebohechan/items/720cc0f830f3222bf99d

上記を参考に、早速homebrewをアップデート。

brew update
Error: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.

You should probably change the ownership and permissions of /usr/local
back to your user account.
  sudo chown -R $(whoami):admin /usr/local

ここでsudo chown -R $(whoami):admin /usr/localを実行しても拒否されたので、ググって対応。

参考:
http://berukann.hatenablog.jp/entry/2015/12/30/123020

これで問題なくupdateができた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0