首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在mac上安装node.js和npm时遇到的困难

在mac上安装node.js和npm时遇到的困难
EN

Stack Overflow用户
提问于 2015-08-12 21:06:29
回答 1查看 577关注 0票数 1

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

我已经看过很多教程了。有时它会被安装,但无法使用。现在我正在使用Homebrew进行安装。

代码语言:javascript
复制
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。我再次尝试安装node.js,然后是这样的:

代码语言:javascript
复制
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$ 
EN

回答 1

Stack Overflow用户

发布于 2015-08-12 21:53:11

你试过下面的步骤吗?

代码语言:javascript
复制
already exists. You may want to remove it:
  rm '/usr/local/share/man/man1/node.1'

首先删除上面的注释,然后重试。此外,对于mac,您可以直接从package安装节点。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31966166

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档