【问题标题】:NVM can not install nodejs on ubuntu 18.04NVM 无法在 ubuntu 18.04 上安装 nodejs
【发布时间】:2021-08-10 11:58:31
【问题描述】:

我尝试在 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.

【问题讨论】:

  • 您可能已经使用 sudo 安装了 nvm。现在您正在尝试使用不带 sudo 的 nvm 安装节点
  • 我尝试在 root 和用户端都安装 nvm。但仍然有同样的错误。然后我使用存档安装了nodeJS。

标签: node.js nvm


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-06-07
    • 2020-09-09
    • 2019-01-09
    • 2019-01-17
    • 1970-01-01
    • 1970-01-01
    • 2019-06-01
    相关资源
    最近更新 更多