【问题标题】:Can't link node -- "No such keg exists"无法链接节点——“不存在这样的小桶”
【发布时间】:2012-12-08 22:35:17
【问题描述】:

所以我整天都在尝试安装节点。我已经重新安装了 Xcode,安装了命令行工具,brew prune,brew cleanup,删除了节点,再次重新安装,它仍然不会链接。任何帮助是极大的赞赏。

运行 OSX 10.8.2

acd41302428433:Cellar rrichrs$ brew link node
Linking /usr/local/Cellar/node/0.8.15... Warning: Could not link node. Unlinking...

Error: Could not symlink file: /usr/local/Cellar/node/0.8.15/bin/npm
Target /usr/local/bin/npm already exists. You may need to delete it.
To force the link and delete this file, do:
brew link --overwrite formula_name

To list all files that would be deleted:
brew link --overwrite --dry-run formula_name
acd41302428433:Cellar rrichrs$ brew link --overwrite --dry-run formula_name
Error: No such keg: /usr/local/Cellar/formula_name
acd41302428433:Cellar rrichrs$ 

【问题讨论】:

  • 使用官方节点安装程序有什么问题?

标签: xcode macos node.js terminal


【解决方案1】:

我意识到这并不能准确回答您的问题。但我强烈建议为节点安装 nvm。这将允许您运行多个版本的节点并在它们之间进行更改。节点变化如此之快,我遇到了需要旧版本节点的项目。使用 nvm 就这么简单

nvm install 0.4.2
nvm use 0.4.2

Documentation and install instructions for nvm

基本上安装就像将 curl 命令复制并粘贴到终端一样简单:

curl https://raw.github.com/creationix/nvm/master/install.sh | sh

【讨论】:

  • 我认为这与 rvm 的想法相同?我试试看,谢谢!
猜你喜欢
  • 1970-01-01
  • 2021-12-23
  • 1970-01-01
  • 1970-01-01
  • 2012-06-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多