1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Homebrewのupdateが上手くいかない時にしたこと

Posted at

出社後に brew update && brew upgrade てする習慣があるので今朝してみたら

bash
> brew update && brew upgrade
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

なんて言われてしまった。
Homebrewのディレクトリのパーミッションが書き換わってしまっている様なので
書いてある通りにやってみると

bash
> sudo chown -R  $(whiami):admin /usr/local
Password: 
> brew update && brew upgrade
Stashing .....
M dir
.
.
.
Error: Failure while executing: git stash pop --quiet

怒られた…
Stashしろってことはファイルの中身まで書き換わってるのかな?
特に変更したことないんだけどなぁ…

ともあれ

bash
> cd /usr/local && git stash pop --quiet
Library/Formula/.....rb already exists, no checkout
.
.
.
.
Could not restore untracked file from stash
> brew update && brew upgrade
updated .....

こんな感じで更新出来たのでまぁ良しとしよう。

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?