brew update /usr/local is not writable
今天使用 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 协议》,转载必须注明作者和本文链接