首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >NVM:使用nvm命令获得拒绝的权限

NVM:使用nvm命令获得拒绝的权限
EN

Stack Overflow用户
提问于 2021-05-14 21:57:33
回答 10查看 23.7K关注 0票数 35

我最近刚安装了Ubuntu 21.04,希望安装nvm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

然后关闭并重新打开终端。当请求安装版本时,12.16.3 (也尝试过其他版本)。我得到了以下错误:

代码语言:javascript
复制
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.
EN

回答 10

Stack Overflow用户

回答已采纳

发布于 2021-05-18 16:37:34

发布了一个问题到nvm的回购

结果是curl出了问题,我用snap而不是普通的apt install curl安装了它。

票数 70
EN

Stack Overflow用户

发布于 2021-09-08 20:27:53

卸载与curl一起安装的snap

代码语言:javascript
复制
sudo snap remove curl

curl安装apt

代码语言:javascript
复制
sudo apt install curl
票数 36
EN

Stack Overflow用户

发布于 2021-05-18 14:10:11

我也有过同样的问题。这是因为缺乏"libssl-dev“。在启动nvm的安装过程之前运行以下命令

sudo apt-get install build-essential libssl-dev curl git-core

票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67541374

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档