在您的地窖中酿造未连接的小桶

Brew unlinked kegs in your Cellar

当我在终端上 运行 brew doctor 时,我得到以下输出:

Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run brew link on these:

automake
libgpg-error
libksba
libtool

然后,当我尝试使用 brew link packagename 命令 link 任何包时,我得到这样的输出:

Linking /usr/local/Cellar/automake/1.15... Error: Could not symlink share/info/automake-history.info /usr/local/share/info is not writable.

我正在尝试安装 git 并且需要解决这个问题。或者这是一个问题?

编辑: 另外,当我尝试 sudosudo brew link automake 这次 return 这个错误:

Error: Cowardly refusing to sudo brew link You can use brew with sudo, but only if the brew executable is owned by root. However, this is both not recommended and completely unsupported so do so at your own risk.

没有任何变化。

目录 /usr/local/share/info 似乎没有正确的所有权,所以尝试:

sudo chown -R $USER /usr/local/share/info && brew doctor

可能还需要在您的个人资料中包含 DYLD_LIBRARY_PATH

export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH