nvm在install node的时候报错解决办法
#nvm在install node的时候报错
最近creat react项目的时候发现node版本太低需要update,本来电脑上已经安装了nvm,只需要install一下就可以了,但是无奈报了下面这一大堆,烦人:
Downloading and installing node v16.15.0…
mkdir: /usr/local/opt/nvm/.cache/bin/node-v16.15.0-darwin-x64/files: Permission denied
creating directory /usr/local/opt/nvm/.cache/bin/node-v16.15.0-darwin-x64/files failed
Downloading https://nodejs.org/dist/v16.15.0/node-v16.15.0-darwin-x64.tar.gz…
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to nodejs.org:443
Binary download from https://nodejs.org/dist/v16.15.0/node-v16.15.0-darwin-x64.tar.gz failed, trying source.
grep: /usr/local/opt/nvm/.cache/bin/node-v16.15.0-darwin-x64/node-v16.15.0-darwin-x64.tar.gz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
mkdir: /usr/local/opt/nvm/.cache/src/node-v16.15.0/files: Permission denied
creating directory /usr/local/opt/nvm/.cache/src/node-v16.15.0/files failed
Downloading https://nodejs.org/dist/v16.15.0/node-v16.15.0.tar.gz…
Warning: Failed to create the file
Warning: /usr/local/opt/nvm/.cache/src/node-v16.15.0/node-v16.15.0.tar.gz: No
Warning: such file or directory
curl: (23) Failed writing body (0 != 1107)
Binary download from https://nodejs.org/dist/v16.15.0/node-v16.15.0.tar.gz failed, trying source.
grep: /usr/local/opt/nvm/.cache/src/node-v16.15.0/node-v16.15.0.tar.gz: No such file or directory
Provided file to checksum does not exist.
解决办法:export NVM_DIR=“ H O M E / . n v m " [ − s " HOME/.nvm" [ -s " HOME/.nvm"[−s"NVM_DIR/nvm.sh” ] && . “$NVM_DIR/nvm.sh”
就这样很快解决了,主要原因是权限不够
更多推荐
所有评论(0)