我可以强制 link node@6 吗?

Can I link node@6 by force?

强行linknode@6可以吗?

$ which node
$ echo $?
1

$ brew link node
Error: No such keg: /usr/local/Cellar/node

$ brew search node
leafnode          llnode            node              node-build        node@0.10         node@0.12         node@4            node@5            node@6 ✔          nodebrew          nodeenv           nodenv
Caskroom/cask/mindnode-pro          Caskroom/cask/node-profiler         Caskroom/cask/nodebox               Caskroom/cask/nodeclipse            Caskroom/cask/printnode             Caskroom/cask/soundnode

$ brew link node@6
Warning: node@6 is keg-only and must be linked with --force
Note that doing so can interfere with building software.

编辑:

我继续做了:

$ brew link node@6 --force
Linking /usr/local/Cellar/node@6/6.9.5... 7 symlinks created

nodenpm 现在工作正常。 可怕的警告。

您可能(我有)运行 遇到一些 Cellar 问题..

你从 brew doctor 得到的输出是什么?

我在执行时有这个 brew doctor:

警告:某些 keg-only 公式已链接到 Cellar 中。 将 keg-only 公式(例如 gettext)链接到地窖中 brew link <formula> 将导致其他公式在期间检测到它们 ./configure 步骤。这可能会在编译这些时引起问题 其他公式。

我必须执行 brew unlink node@6 才能 return 'your system is ready to brew'。

我 运行 遇到了同样的问题并听从了 brew info node@6 的建议并将 export PATH="/usr/local/opt/node@6/bin:$PATH 添加到我的 .bash_profile。所有命令行工具都按预期工作。

(我现在实际上已经为我的 .bash_profile 删除了该行,并添加了一个别名以在需要时手动设置路径。)