【问题标题】:Facing difficulties while installing node.js and npm in mac在 mac 中安装 node.js 和 npm 时遇到困难
【发布时间】:2015-08-13 20:47:20
【问题描述】:

我正在尝试在 mac mini 中安装 node.js 和 npm。

我已经阅读了很多教程。有时它正在安装并且无法使用它。现在我正在使用 Homebrew 安装。

nbmacmini9:~ afsarunnisa$ brew install node
==> Downloading https://homebrew.bintray.com/bottles/node-0.12.7.yosemite.bottle
######################################################################## 100.0%
==> Pouring node-0.12.7.yosemite.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/man/man1/node.1
Target /usr/local/share/man/man1/node.1
already exists. You may want to remove it:
  rm '/usr/local/share/man/man1/node.1'

To force the link and overwrite all conflicting files:
  brew link --overwrite node

To list all files that would be deleted:
  brew link --overwrite --dry-run node

Possible conflicting files are:
/usr/local/share/man/man1/node.1
/usr/local/share/systemtap/tapset/node.stp
/usr/local/lib/dtrace/node.d
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
????  /usr/local/Cellar/node/0.12.7: 2726 files, 31M
nbmacmini9:~ afsarunnisa$ node -v
-bash: node: command not found

我无法检查是否安装了节点。我再次尝试安装 node.js 然后它是这样的:

nbmacmini9:~ afsarunnisa$ brew install node
Warning: node-0.12.7 already installed, it's just not linked
nbmacmini9:~ afsarunnisa$ node -v
-bash: node: command not found
nbmacmini9:~ afsarunnisa$ 

【问题讨论】:

  • 对我来说,只需致电brew link --overwrite node
  • 如果您还没有找出问题所在,请运行brew doctor,它应该会为您提供一些关于您的安装出了什么问题的线索。其他软件(您在地窖中安装而不使用自制软件)导致安装问题的情况并不少见。

标签: angularjs node.js ionic-framework ionic


【解决方案1】:

你试过下面的步骤吗

already exists. You may want to remove it:
  rm '/usr/local/share/man/man1/node.1'

首先使用上述评论删除,然后重试。同样对于 mac,您可以直接从 package 安装节点

【讨论】:

    猜你喜欢
    • 2012-12-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-30
    相关资源
    最近更新 更多