所以我一直在尝试整天安装节点。我重新安装了Xcode,安装了命令行工具,brew prune,brew清理,删除了节点,再次重新安装,它仍然无法链接。任何帮助是极大的赞赏。
运行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$
答案 0 :(得分: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