NVM无法在Ubuntu 18.04上安装nodejs

wixjitnu  于 2023-06-29  发布在  Node.js
关注(0)|答案(3)|浏览(217)

我尝试在Ubuntu 18.04上使用nvm安装nodejs。但每次它抛出以下错误堆栈

pasindu@pasindu-HP-EliteBook-850-G7-Notebook-PC:~$ nvm install 0.10.35

Downloading and installing node v0.10.35...
Downloading https://nodejs.org/dist/v0.10.35/node-v0.10.35-linux-x64.tar.gz...
Warning: Failed to create the file                                             
Warning: /home/pasindu/.nvm/.cache/bin/node-v0.10.35-linux-x64/node-v0.10.35-li
Warning: nux-x64.tar.gz: Permission denied
curl: (23) Failure writing output to destination

Binary download from https://nodejs.org/dist/v0.10.35/node-v0.10.35-linux-x64.tar.gz failed, trying source.
grep: /home/pasindu/.nvm/.cache/bin/node-v0.10.35-linux-x64/node-v0.10.35-linux-x64.tar.gz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Detected that you have 12 CPU core(s)
Running with 11 threads to speed up the build
Downloading https://nodejs.org/dist/v0.10.35/node-v0.10.35.tar.gz...
Warning: Failed to create the file                                             
Warning: /home/pasindu/.nvm/.cache/src/node-v0.10.35/node-v0.10.35.tar.gz: 
Warning: Permission denied
curl: (23) Failure writing output to destination

Binary download from https://nodejs.org/dist/v0.10.35/node-v0.10.35.tar.gz failed, trying source.
grep: /home/pasindu/.nvm/.cache/src/node-v0.10.35/node-v0.10.35.tar.gz: No such file or directory
Provided file to checksum does not exist.
ua4mk5z4

ua4mk5z41#

可能是snap curl的问题,见here,因为我一开始用snap安装curl,总是遇到这个问题,后来我用sudo snap remove curl删除curl,用sudo apt install curl重新安装,我现在的curl版本是7.68.0。然后解决了

gt0wga4j

gt0wga4j2#

我必须清除该高速缓存:nvm cache clear
我已经得到了错误后,我试图安装一个版本的节点,我已经尝试安装,但安装过程失败,在第一次由于断开与互联网.

xyhw6mcr

xyhw6mcr3#

每当我尝试安装node版本时,由于某种原因,我的互联网连接一直断开。几个小时后,我想,让我们尝试这个与VPN连接,它花了3秒钟,我们完成了。

相关问题