“Unlinked kegs in your Cellar”. How do I remove th

2019-03-23 03:13发布

After installing and uninstalling some programs through brew and brew cask, now I get brew doctor saying "unlinked kegs in your Cellar".

It suggests to link them, to avoid build trouble with later brews, but instead I'd rather delete them, as they're leftovers from brew programs or formulas that I don't use anymore.

How or where do I remove these? (I don't even know what a keg, or the Cellar, is)

7条回答
走好不送
2楼-- · 2019-03-23 04:18

After installing homebrew on Mac I had the following error:

$ 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 or file an issue; just ignore this. Thanks!

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:
  libtool
  libksba
  libyaml
  libgpg-error

After running brew link libtool I would get the following error:

$ brew link libtool
Linking /usr/local/Cellar/libtool/2.4.6_1... 
Error: Could not symlink include/libltdl
/usr/local/include is not writable.

But as it turned out I didn't have a folder /usr/local/include at all. So I created it. And then changed the owner and group of the new folder to match the other folders in /usr/local. The next error was the same for /usr/local/lib, so I followed the same process.

After creating those two folders, brew link [package] worked.

Cheers. Appleseed.

查看更多
登录 后发表回答