$ 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 bytes download 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 bytes download 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:
1
$ sudo snap remove curl --purge
重新安装 curl:
1
$ sudo apt install curl
再次安装 node 成功:
1 2 3 4 5 6 7 8 9
$ 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)