不能`BREW link`未链接的小桶(Can't `brew link` an unlin

2019-07-29 17:15发布

$: which node
$: node
-bash: node: command not found
$: brew install node
Error: node-0.6.18 already installed
$: brew doctor
Error: 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.

node

$: brew link node
Error: No such file or directory - /usr/local/Cellar/node/0.6.5
$: brew uninstall node
Error: No such file or directory - /usr/local/Cellar/node/0.6.5
$: brew install node
Error: node-0.6.18 already installed

如何让我的节点回到正轨?

Answer 1:

我可以通过运行重新链接节点的正确版本:

brew cleanup
brew link node
brew uninstall node
brew install node


Answer 2:

我得到:

$ brew link node
Error: No such keg: /usr/local/Cellar/node
$ brew link node@8
Warning: node@8 is keg-only and must be linked with --force

该命令有助于得到的一切再次合作:

brew link --overwrite --force node@8


Answer 3:

要强制链接,并覆盖所有冲突的文件:

brew link --overwrite node


文章来源: Can't `brew link` an unlinked keg