gpt4 book ai didi

angularjs - 在 Mac 上安装 Node.js 和 npm 时遇到困难

转载 作者:太空宇宙 更新时间:2023-11-04 00:52:03 25 4
gpt4 key购买 nike

我正在尝试在 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 是否已安装。我再次尝试安装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$

最佳答案

您是否尝试过以下步骤

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

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

关于angularjs - 在 Mac 上安装 Node.js 和 npm 时遇到困难,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31966166/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com