当我运行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:
# [...]brew link到底是做什么的呢?
发布于 2015-10-22 04:31:22
brew link创建指向您在Cellar中手动执行的安装的符号链接。这使您可以灵活地自行安装内容,但仍然可以将这些内容作为依赖项参与homebrew公式中。
有关详细信息,请参阅FAQ。
您应该遵循这些说明,并对它列出的条目运行brew link。
发布于 2019-01-14 12:25:53
Homebrew允许安装一个配方的多个版本。例如,有称为node和node@10的公式以及类似的公式。
$ brew info node@10
...
==> Caveats
node@10 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.如果我同时安装了node和node@10,其中node位于v11。稍后我可以决定使用brew link激活早期版本
$ brew unlink node
$ brew link node@10
$ cd /urs/local/bin
$ ls -l node
lrwxr-xr-x 1 user admin 34 12 Dec 20:07 node -> ../Cellar/node@10/10.14.1/bin/node这里的符号链接node指向安装在Cellar中的较早版本(keg-only)。
https://stackoverflow.com/questions/33268389
复制相似问题