gpt4 book ai didi

node.js - 无法安装npm

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

我正在尝试在 OSX 上安装 node,如下所示:

brew install node

但是,我收到以下错误:

Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
==> Downloading https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz
Already downloaded: /Library/Caches/Homebrew/node-0.12.7.tar.gz
==> ./configure --prefix=/usr/local/Cellar/node/0.12.7 --without-npm --without-s
==> make install
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [/private/tmp/node20160118-13255-1k2k8lz/node-v0.12.7/out/Release/openssl-cli] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [node] Error 2
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.

READ THIS: https://git.io/brew-troubleshooting

Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.

我卸载了 macports 但错误仍然存​​在。

如何在 Mac 上安装 nodenpm

最佳答案

Mac OS X 的可用选项:

<小时/>

cURL 并使用 bash 执行:

curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.*>node-(.*)\.pkg</a>.*|\1|p')}.pkg" > "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/"

关于node.js - 无法安装npm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34853001/

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