node.js - 由于校验和不匹配,nvm 安装 nodejs 失败

标签 node.js ubuntu vagrant ubuntu-18.04 nvm

我尝试在 vagrant box ubuntu/bionic64 上使用 nvm 安装 nodejs,但不幸的是在安装过程中遇到了问题。安装命令在我的本地 wsl 上运行它很好,不知道为什么在 vagrant box 上有问题。以下是我的安装命令和安装错误。

wget -qO- https://raw.github.com/creationix/nvm/master/install.sh | sh
nvm install 12.18.3
Downloading and installing node v12.18.3...
Local cache found: ${NVM_DIR}/.cache/bin/node-v12.18.3-linux-x64/node-v12.18.3-linux-x64.tar.xz
Computing checksum with sha256sum
Checksums do not match: '7bedb667857950ad616bc1be0be5d96c7e5ba7e1d99f544df54f1fa7d07b67be' found, 'b79e02e48d0a1ee4cd4ae138de97fda5413542f2a4f441a7d0e189697b8da563' expected.
Checksum check failed!
Removing the broken local cache...
Downloading https://nodejs.org/dist/v12.18.3/node-v12.18.3-linux-x64.tar.xz...
##################################################################################################################################################### 100.0%Computing checksum with sha256sum
Checksums do not match: 'ed85d09bce5a33233ffad2e905e9cdf85d195b1005d1a3579c86381a86dc8e0d' found, 'b79e02e48d0a1ee4cd4ae138de97fda5413542f2a4f441a7d0e189697b8da563' expected.
xz: (stdin): Compressed data is corrupt
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
Binary download failed, trying source.
Detected that you have 1 CPU core(s)
Number of CPU core(s) less than or equal to 2, running in single-threaded mode
Local cache found: ${NVM_DIR}/.cache/src/node-v12.18.3/node-v12.18.3.tar.xz
Computing checksum with sha256sum
Checksums do not match: 'be461dce2b2b5cc22aa3752dadd38513053a2b5b0fc6d608a3e7d520066c51cc' found, '71158026579487422fd13cc2553b34cddb76519098aa6030faab52f88c6e0d0e' expected.
Checksum check failed!
Removing the broken local cache...
Downloading https://nodejs.org/dist/v12.18.3/node-v12.18.3.tar.xz...
##################################################################################################################################################### 100.0%Computing checksum with sha256sum
Checksums do not match: 'd842d965b6bc5f051c9ca0cbe7b7c93878e9bc042f1e9a731bc84107ceb6cb5b' found, '71158026579487422fd13cc2553b34cddb76519098aa6030faab52f88c6e0d0e' expected.
xz: (stdin): Compressed data is corrupt
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
nvm: install v12.18.3 failed!

最佳答案

参见 this post

遇到了类似的问题。我按照说明禁用了 Windows Hyper-V,现在我的校验和问题随着 Vagrant/Virtualbox/NVM 安装而消失了。遗憾的是,这似乎弄乱了我使用较多的 Docker,因此虽然这解决了这个问题,但解决方法可能更糟。

关于node.js - 由于校验和不匹配,nvm 安装 nodejs 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63634437/

相关文章:

node.js - 我可以从 ts 编译器中动态排除文件吗?

mysql - Vagrant:如果共享/var/lib/mysql,mysql 不会启动

postgresql - Puppet PostgresQL 管理,错误:Puppet::Parser::AST::

node.js - Mongoose 虚拟机是否困惑?

node.js - socket.io + 使用 'emit' 回调?

java - 如何将我的应用程序添加到快速启动 Ubuntu

ubuntu - 在 Grafana 中,如何设置数据源并从 cli 加载模板?

linux - Vagrant.configure 的语法错误 ("2") do |config|, while trying to run a script file

c - 如何将 char* 参数传递给在 Node.js 中执行的 C 方法?

linux - 如何在 Ubuntu 上使用 Mongodb 27017 端口