多用户配置中的 Brew Doctor 警告

Brew Doctor Warnings in Multi-User Configuration

我正在计算机上的两个用户帐户上安装 RVM,为此我需要安装 Homebrew。我已成功安装 Homebrew,运行 brew doctor,然后在第一个帐户上顺利安装 RVM。切换到第二个,安装了 Homebrew 但安装 RVM 遇到此消息 ERROR: '/usr/local/Cellar' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!

在第二个帐户上运行 brew doctor 会出现几个警告:

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: /usr/local/etc isn't writable.

This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

You should probably `chown` /usr/local/etc

Warning: /usr/local/include isn't writable.

This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

You should probably `chown` /usr/local/include

Warning: /usr/local/lib isn't writable.

This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

You should probably `chown` /usr/local/lib

Warning: /usr/local/lib/pkgconfig isn't writable.

This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

You should probably `chown` /usr/local/lib/pkgconfig

Warning: /usr/local/share isn't writable.

This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.

You should probably `chown` /usr/local/share

Warning: Some directories in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:

    /usr/local/share/man
    /usr/local/share/man/man1

Homebrew 不适用于多用户帐户使用。所做的是控制 usr/local 将其所有权更改为安装它的用户。所以它对你的第一个用户(安装了自制软件)工作正常但对第二个用户失败。

您可以找到替代安装说明来解决此问题 here

您可以采取的另一种方法是在两个帐户之间共享 usr/local 的所有权,使两个用户成为同一组的成员,并将组所有权授予 usr/local 可能会奏效。然而,这可能会产生一些奇怪的副作用。