我最近刚安装了Ubuntu 21.04,希望安装nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
然后关闭并重新打开终端。当请求安装版本时,12.16.3 (也尝试过其他版本)。我得到了以下错误:
nvm install 12.16.3
Downloading and installing node v12.16.3...
Downloading https://nodejs.org/dist/v12.16.3/node-v12.16.3-linux-x64.tar.xz...
Warning: Failed to create the file
Warning: /home/sauronnikko/.nvm/.cache/bin/node-v12.16.3-linux-x64/node-v12.16.
Warning: 3-linux-x64.tar.xz: Permission denied
curl: (23) Failure writing output to destination
Binary download from https://nodejs.org/dist/v12.16.3/node-v12.16.3-linux-x64.tar.xz failed, trying source.
grep: /home/sauronnikko/.nvm/.cache/bin/node-v12.16.3-linux-x64/node-v12.16.3-linux-x64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Downloading https://nodejs.org/dist/v12.16.3/node-v12.16.3.tar.xz...
Warning: Failed to create the file
Warning: /home/sauronnikko/.nvm/.cache/src/node-v12.16.3/node-v12.16.3.tar.xz:
Warning: Permission denied
curl: (23) Failure writing output to destination
Binary download from https://nodejs.org/dist/v12.16.3/node-v12.16.3.tar.xz failed, trying source.
grep: /home/sauronnikko/.nvm/.cache/src/node-v12.16.3/node-v12.16.3.tar.xz: No such file or directory
Provided file to checksum does not exist.发布于 2021-05-18 16:37:34
发布了一个问题到nvm的回购
结果是curl出了问题,我用snap而不是普通的apt install curl安装了它。
发布于 2021-09-08 20:27:53
卸载与curl一起安装的snap
sudo snap remove curl从curl安装apt
sudo apt install curl发布于 2021-05-18 14:10:11
我也有过同样的问题。这是因为缺乏"libssl-dev“。在启动nvm的安装过程之前运行以下命令
sudo apt-get install build-essential libssl-dev curl git-core
https://stackoverflow.com/questions/67541374
复制相似问题