MacOS 多用户场景下共享使用Brew
8月 11th, 2021,由 frank撰写
由于办公用的是自己的电脑,为了跟原有管理原账号分开,单独创建了一个办公账号,这样可以方便多场景使用,权限也被限制,但今天在尝试用brew安装软件时,会报下面的错误:
xxx@MacBook ~ % brew install wget
Error: /usr/local/Cellar is not writable. You should change the
ownership and permissions of /usr/local/Cellar back to your
user account:
sudo chown -R $(whoami) /usr/local/Cellar
Error: The following directories are not writable by your user:
按照提示的操作,没多大用处,最后报下面错误:
xxx@MacBook ~ % brew install gettext
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.21.big_sur.bottle
#=#=-# #
curl: (22) The requested URL returned error: 403 Forbidden
Error: Failed to download resource "gettext"
执行下面命令后,恢复正常使用:
sudo chown -R $(whoami) $(brew --prefix)/*
本文出自 Frank's Blog