执行
nvm install v16.17.0
报错内容:
Downloading and installing node v16.17.0...
Downloading https://nodejs.org/dist/v16.17.0/node-v16.17.0-darwin-x64.tar.gz...
0.1%
curl: (56) LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
Binary download from https://nodejs.org/dist/v16.17.0/node-v16.17.0-darwin-x64.tar.gz failed, trying source.
grep: /Users/qiruofan/.nvm/.cache/bin/node-v16.17.0-darwin-x64/node-v16.17.0-darwin-x64.tar.gz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Detected that you have 8 CPU core(s)
Running with 7 threads to speed up the build
Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!
Downloading https://nodejs.org/dist/v16.17.0/node-v16.17.0.tar.gz...
0.5%
curl: (56) LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
Binary download from https://nodejs.org/dist/v16.17.0/node-v16.17.0.tar.gz failed, trying source.
grep: /Users/qiruofan/.nvm/.cache/src/node-v16.17.0/node-v16.17.0.tar.gz: No such file or directory
Provided file to checksum does not exist.
方法一
vim编辑器打开bash_profile文件:
sudo vi .bash_profile
输入下面代码:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \."$NVM_DIR/nvm.sh" # This loadsnvm
[ -s "$NVM_DIR/bash_completion" ] && \."$NVM_DIR/bash_completion" #This loads nvm bash_completion
esc
:wq保存退出
重启命令行后重新执行安装命令
方法二 修改计算机网络配置
系统在解析hostname时使用了ipv6,取消使用
$ networksetup -setv6off Wi-Fi
恢复
$ networksetup -setv6automatic Wi-Fi
方法三 网络问题
如果是下一部分就报错,但是进度是前进的,就多下几次,有可能是网络慢引发的问题。