LoginSignup
42
46

More than 5 years have passed since last update.

Homebrewのパーミッションが壊れたときの対策

Posted at

brew updateを実行しても、以下のようなエラーメッセージが出る場合があります。

$ brew update
error: unable to unlink old 'CONTRIBUTING.md' (Permission denied)

今回は、Homebrewのインストールディレクトリのパーミッションが壊れているためエラーが出ていました。

対策として、以下のコマンドを実行して

  • パーミッションを修正する
  • brew updateではなく、手動でFormulaを更新する

よう対策します。

$ cd $(brew --prefix)

$ ls -af .
$ sudo chown -R [username]:admin $(brew --prefix)

$ git fetch --all
$ git reset --hard origin/master

42
46
1

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
42
46