当前位置: 首页 > news >正文

Ubuntu 24.04 中 nvm 安装 Node 权限问题解决

参考nvm的一个issue:https://github.com/nvm-sh/nvm/issues/3363

异常信息如下:

$ nvm install 22
Downloading and installing node v22.19.0...
Downloading https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-x64.tar.xz...
-#O=#    #       #                                                                                                                                                                       Warning: Failed to open the file /home/zhangjc/.nvm/.cache/bin/node-v22.19.0-linux-x64/node-v22.19.0-linux-x64.tar.xz: Permission denied
curl: (23) client returned ERROR on write of 1360 bytesdownload from https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-x64.tar.xz failed
grep: /home/zhangjc/.nvm/.cache/bin/node-v22.19.0-linux-x64/node-v22.19.0-linux-x64.tar.xz: 没有那个文件或目录
Provided file to checksum does not exist.
Binary download failed, trying source.
Downloading https://nodejs.org/dist/v22.19.0/node-v22.19.0.tar.xz...
-=#=- #     #       #                                                                                                                                                                    Warning: Failed to open the file /home/zhangjc/.nvm/.cache/src/node-v22.19.0/node-v22.19.0.tar.xz: Permission denied
curl: (23) client returned ERROR on write of 1360 bytesdownload from https://nodejs.org/dist/v22.19.0/node-v22.19.0.tar.xz failed
grep: /home/zhangjc/.nvm/.cache/src/node-v22.19.0/node-v22.19.0.tar.xz: 没有那个文件或目录
Provided file to checksum does not exist.

卸载使用 snap 安装的 curl:

$ sudo snap remove curl --purge

重新安装 curl:

$ sudo apt install curl

再次安装 node 成功:

$ nvm install 22
Downloading and installing node v22.19.0...
Downloading https://nodejs.org/dist/v22.19.0/node-v22.19.0-linux-x64.tar.xz...
################################################################################################################################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v22.19.0 (npm v10.9.3)
Creating default alias: default -> 22 (-> v22.19.0)


文章转载自:

http://UabQZ0IM.spLcc.cn
http://bVL992tv.spLcc.cn
http://lWK9o4Y5.spLcc.cn
http://SJl7ux1b.spLcc.cn
http://gmvSGxYg.spLcc.cn
http://abOXGqex.spLcc.cn
http://68iGb91e.spLcc.cn
http://nkQAWRMz.spLcc.cn
http://wSalF6Sb.spLcc.cn
http://2PV9adKo.spLcc.cn
http://IurpDO7q.spLcc.cn
http://IxfPE6zT.spLcc.cn
http://uR35TK6n.spLcc.cn
http://i1UW8tQL.spLcc.cn
http://iT2YQPx7.spLcc.cn
http://wMxHe3HA.spLcc.cn
http://6NCuqlWT.spLcc.cn
http://I8gNxl8o.spLcc.cn
http://oReBLe3K.spLcc.cn
http://wUwoH92U.spLcc.cn
http://CRcdV4dn.spLcc.cn
http://mNv4FpGo.spLcc.cn
http://a1EHivy2.spLcc.cn
http://IYLADJGW.spLcc.cn
http://XW3rxIl1.spLcc.cn
http://WYoh377Q.spLcc.cn
http://aiYPqFkA.spLcc.cn
http://wOzsBKHa.spLcc.cn
http://I3gi5wJR.spLcc.cn
http://bF7bwCIP.spLcc.cn
http://www.dtcms.com/a/366414.html

相关文章:

  • Jfinal-简
  • VR红色教育基地+数字党建展厅+智慧校史馆
  • 基于单片机智能水龙头/智能洗漱台设计
  • Android入门到实战(八):从发现页到详情页——跳转、传值与RecyclerView多类型布局
  • Android SystemServer 系列专题【AttentionManagerService】
  • 如何在SpringBoot项目中优雅的连接多台Redis
  • Windows 编程——字符串处理
  • ReAct模式解读
  • 学会 Java 异常处理,其实没你想的那么难
  • 学习PaddlePaddle--环境配置-Windows 11 + RTX 4060
  • 渐变背景色和渐变字体颜色的实现方法
  • 美团开源龙猫大模型,与DeepSeek V3同一梯队?
  • 让B站视频4倍速度播放
  • Redis C++ 实现笔记(F篇)
  • 23种设计模式-Proxy模式
  • 无限时长视频生成新突破!复旦联合微软、腾讯混元推出StableAvatar,仅需1张照片+1段音频实现真人说话视频
  • 在 Debian 系统上清理缓存的方式和具体操作方法
  • Flink反压问题
  • 视频增强AI哪个效果好?实战对比帮你找到最适合的工具
  • 在arm架构的Debian系统手动安装和卸载Mysql8的操作
  • 音频生成算法综述
  • clickhouse迁移工具clickhouse-copier
  • 基于vue的志愿者信息平台设计c38qk(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
  • 对接旅游行业安全需求:旅游安全急救实训室的功能构建与育人目标
  • APM32芯得 EP.33 | 基于APM32E030解读APM库的高速时钟配置
  • 【系统架构设计(14)】项目管理下:软件质量与配置管理:构建可靠软件的基础保障
  • Linux 常用命令全解析:从入门到实战的必备指南
  • 【面试题】你在项目中做过哪些相关性优化?
  • C#某公司面试题(含题目和解析)--1
  • Kafka如何保证高可用