【发布时间】:2021-11-15 14:52:42
【问题描述】:
尝试使用 brew 下载内容时,我收到一条消息:
Error: The following directories are not writable by your user:
/usr/local/lib/pkgconfig
You should change the ownership of these directories to your user.
sudo chown -R $(whoami) /usr/local/lib/pkgconfig
And make sure that your user has write permission.
chmod u+w /usr/local/lib/pkgconfig
我错误地认为我需要用我的名字替换$(whoami),然后我收到一条警告,提示 zsh: command not found "myname" 但要求输入密码。输入密码之前我没有多想。
然后我输入密码后得到这个:
usage: chown [-fhnv] [-R [-H | -L | -P]] owner[:group] file ...
chown [-fhnv] [-R [-H | -L | -P]] :group file ...
在那之后,我意识到我不应该替换$(whoami)。我该如何解决这个问题?
我尝试使用正确的 $(whoami) 再次运行该行,但什么也没发生。我可以继续跑吗
chmod u+w /usr/local/lib/pkgconfig
或者在我运行下一行之前尝试解决这个问题?
【问题讨论】:
标签: homebrew