nvm icon indicating copy to clipboard operation
nvm copied to clipboard

用brew安装nvm成功了,但是nvm安装node失败了

Open delbug opened this issue 6 months ago • 4 comments

系统和版本: macOs 15.14.1 Image

nvm版本:

Image

nvm debug

执行命令:nvm install 14.17.5

报错截图:

Image Image

23 warnings generated. 21 warnings generated. rm 32d1f7fcac13b1f13e780f5b0601cdd245bcca79.intermediate make: *** [node] Error 2 nvm: install v14.17.5 failed!

如何安装nvm?

brew install nvm

我直行了哪些步骤

  1. 直行命令:brew install nvm

  2. 执行命令 nvm install 14.17.5

  3. 提示 nvm 不存在

  4. 我在 .zshrc 文件里面输入了以下内容 Image

  5. 执行命令 nvm install 14.17.5 后就报错了

  6. 我尝试过 卸载和重装nvm没效果,我尝试过把Python版本换到3.9.13 也没效果

delbug avatar May 07 '25 12:05 delbug

note: nvm is not supported when installed via homebrew. Please remove it, and install it via the official install script in the readme.

Separately, nvm is a sourced shell function, not a binary, and you have to restart your shell (or re-source your profile file) to make it available. After installing it properly, please confirm that your zshrc or zprofile has the three expected "sourcing nvm" lines.

ljharb avatar May 07 '25 15:05 ljharb

ah, yes that's true, it might also be that you need to use Rosetta.

ljharb avatar May 09 '25 18:05 ljharb