通过brew
and安装和卸载某些程序后brew cask
,现在我brew doctor
说“您的酒窖中未链接的小桶”。
它建议将它们链接起来,以避免在以后的 brews 中产生麻烦,但我宁愿删除它们,因为它们是 brew 程序或我不再使用的公式的剩余物。
我如何或在哪里删除这些?(我什至不知道小桶或酒窖是什么)
通过brew
and安装和卸载某些程序后brew cask
,现在我brew doctor
说“您的酒窖中未链接的小桶”。
它建议将它们链接起来,以避免在以后的 brews 中产生麻烦,但我宁愿删除它们,因为它们是 brew 程序或我不再使用的公式的剩余物。
我如何或在哪里删除这些?(我什至不知道小桶或酒窖是什么)
运行:
brew remove packageName
对于每个未链接的包。
2018 更新
$ brew link --help
If --overwrite is passed, Homebrew will delete files which already exist
in the prefix while linking.
$ brew link --overwrite [package]
$ brew doctor
runningbrew link
会调出你可以使用的可选命令,同时你需要一个参数来配合它,否则它会提示你一个错误。
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:
mongodb
brew link
brew link --dry-run <yourArgument>
brew link --overwrite <yourArgument>
brew link --overwrite mongodb
Linking /usr/local/Cellar/mongodb/3.2.7... 0 symlinks created
brew doctor
最后我运行了这个命令,我的响应不再有问题。
Your system is ready to brew.
在 Mac 上安装自制软件后,出现以下错误:
$ 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
运行后brew link libtool
我会收到以下错误:
$ brew link libtool
Linking /usr/local/Cellar/libtool/2.4.6_1...
Error: Could not symlink include/libltdl
/usr/local/include is not writable.
但事实证明我根本没有文件夹/usr/local/include
。所以我创造了它。然后更改新文件夹的所有者和组以匹配/usr/local
. 下一个错误是相同的/usr/local/lib
,所以我遵循相同的过程。
创建这两个文件夹后,brew link [package]
工作。
brew cleanup [选项] [公式|木桶]
删除所有公式和木桶的过时锁定文件和过时下载,并删除已安装公式的旧版本。如果指定了参数,则仅对给定的公式和木桶执行此操作。
--prune Remove all cache files older than specified days. -n, --dry-run Show what would be removed, but do not actually remove anything. -s Scrub the cache, including downloads for even the latest versions. Note downloads for any installed formula or cask will still not be deleted. If you want to delete those too: rm -rf "$(brew --cache)" --prune-prefix Only prune the symlinks and directories from the prefix and remove no other files. -v, --verbose Make some output more verbose. -d, --debug Display any debugging information. -h, --help Show this message.
brew prune [--dry-run]: 从 Homebrew 前缀中删除死符号链接。这通常不需要,但在进行 DIY 安装时很有用。还要从 /Applications 和 ~/Applications 中删除损坏的应用程序符号链接,这些链接以前由 brew linkapps 创建。
如果 --dry-run 或 -n 已通过,则显示将要删除的内容,但实际上不删除任何内容。
rm /usr/local/Library/Taps/josegonzalez
-或者如果你害怕-
mv /usr/local/Library/Taps/josegonzalez /usr/local/Library
其他冲突但未链接的小桶/水龙头也是如此。
您还可以使用控制台中提供的信息并再次链接它们:
Run `brew link`
对列出的每个项目执行此操作,一切都应该很快得到修复。