自制错误:未发现的dylibs被发现..,无法写入/ usr / local / Cellar

时间:2015-02-02 05:31:53

标签: homebrew

我试图在我的计算机上安装一些东西来运行Rails项目。我正在安装Homebrew,当我执行命令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/Cellar isn't writable.
You should `chown` /usr/local/Cellar

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/libecomlodr.dylib

在尝试安装Git时,我收到了此消息

  

错误:无法写入/ usr / local / Cellar

1 个答案:

答案 0 :(得分:0)

要为当前用户启用/usr/local/Cellar的写访问权,您应该执行

sudo chown -R `whoami` /usr/local/Cellar

并且,为了一致性:

sudo chmod -R u+w /usr/local/Cellar
从命令行

。前者设定了适当的所有权;后者允许当前用户写入目录。但通常这条消息意味着您的环境通常存在问题,因为您应该可以访问此目录。