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

后端 未结 7 1333
一个人的身影
一个人的身影 2021-02-02 07:53

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

7条回答
  •  别跟我提以往
    2021-02-02 08:39

    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.

提交回复
热议问题