brew更新错误:/usr/local目录不可写.sudo chown-R$(whoami):admin/usr/loc



我收到这个错误:

jaimes-mbp:SMR jaimemontoya$ 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
jaimes-mbp:SMR jaimemontoya$ 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
jaimes-mbp:SMR jaimemontoya$ sudo chown -R $(whoami):admin /usr/local
Password:
chown: /usr/local: Operation not permitted
jaimes-mbp:SMR jaimemontoya$ 

出于某种原因,它不允许我更改/usr/local的所有权和权限。

从High Sierra,您不能更改/usr/local的所有权。

用途:

sudo chown -R $(whoami) $(brew --prefix)/*

最新更新