M2 MacBook Pro nvm install node报错404

最近入手了一款M2 pro芯片的mac,在使用nvm来管理node版本的时候发现在安装nodeV14.x版本的出现死循环的情况具体输出如下

nvm install 14.19.0
Downloading and installing node v14.19.0...
Downloading https://nodejs.org/dist/v14.19.0/node-v14.19.0-darwin-arm64.tar.xz...
curl: (22) The requested URL returned error: 404                               

Binary download from https://nodejs.org/dist/v14.19.0/node-v14.19.0-darwin-arm64.tar.xz failed, trying source.
grep: /Users/xuyuejin/.nvm/.cache/bin/node-v14.19.0-darwin-arm64/node-v14.19.0-darwin-arm64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Detected that you have 10 CPU core(s)
Running with 9 threads to speed up the build
Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!
Local cache found: ${NVM_DIR}/.cache/src/node-v14.19.0/node-v14.19.0.tar.xz
Checksums match! Using existing downloaded archive ${NVM_DIR}/.cache/src/node-v14.19.0/node-v14.19.0.tar.xz
$>./configure --prefix=/Users/xuyuejin/.nvm/versions/node/v14.19.0 <
Node.js configure: Found Python 3.9.6...
INFO: configure completed successfully
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C out BUILDTYPE=Release

解决方案
执行install命令前先执行M2兼容命令:

arch -x86_64 zsh

然后再执行install就OK了

  • 4
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值