我正在使用OSX 10.12,我最近遇到了一个奇怪的问题.如果我使用Homebrew安装包,则无法链接包,因为权限不正确.运行后brew doctor我得到以下消息:
Warning: The following directories are not writable:
/usr/local/sbin
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.
You should change the ownership and permissions of these directories.
back to your user account.
sudo chown -R $(whoami) /usr/local/sbin
Run Code Online (Sandbox Code Playgroud)
运行了很多不同的权限命令,我在网上找到了我仍然在努力解决这个问题.我尝试过(至少)以下命令
sudo chown -R $(whoami) /usr/local
sudo chown -R $(whoami) /usr/local/sbin
sudo chown -R …Run Code Online (Sandbox Code Playgroud)