作者:圣友家具简章da | 来源:互联网 | 2024-10-22 01:30
我最近全新安装了 Ubuntu 21.04 并想安装 nvm:curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install
我最近全新安装了 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.
回答
向 nvm 的 repo发布了一个问题
事实证明问题出在curl
我安装它snap
而不是常规apt install curl
.
回答
我遇到过同样的问题。这是由于缺少“libssl-dev”。在开始 nvm 的安装过程之前运行以下命令
sudo apt-get install build-essential libssl-dev curl git-core