brew update /usr/local is not writable

地平線發表於2020-02-18

今天使用 brew update 更新源的時候,報錯了

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

按照提示執行

sudo chown -R $(whoami) /usr/local

提示無許可權,瞬間無語。

後來在 github 找到相同問題 issue
需要先解除安裝然後重新安裝

sudo /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
本作品採用《CC 協議》,轉載必須註明作者和本文連結
如果你不能把一件事很簡單的講清楚,那麼你就是還不夠了解。

相關文章