nvm: nvm install node fails to install on Ubuntu 22.04

I’m trying to install the latest version of node using nvm, but I’m simply getting nvm: install v19.3.0 failed! with no further explanation. It does fail the binary download, but I have the build-essential package installed as well.

Operating system and version:

Ubuntu 22.04.1 LTS

nvm debug output:

nvm --version: v0.39.3
$TERM_PROGRAM: vscode
$SHELL: /usr/bin/zsh
$SHLVL: 2
whoami: 'tamas'
${HOME}: /home/tamas
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${HOME}/.fly/bin:${HOME}/.local/bin:${HOME}/.rbenv/bin:${HOME}/.mix/escripts:/home/nazgul/.deno/bin:${HOME}/.fly/bin:${HOME}/.local/bin:${HOME}/.rbenv/bin:${HOME}/.mix/escripts:/home/nazgul/.deno/bin:${HOME}/.zinit/plugins/docker---compose:${HOME}/.zinit/plugins/starship---starship:${HOME}/.zinit/polaris/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:${HOME}/.fzf/bin:/snap/bin:/usr/local/go/bin:${HOME}/.cargo/bin:${HOME}/.rvm/bin:/snap/bin:/usr/local/go/bin:${HOME}/.cargo/bin:${HOME}/.rvm/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.8.1 (x86_64-ubuntu-linux-gnu)'
uname -a: 'Linux 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux'
checksum binary: 'sha256sum'
OS version: Ubuntu 22.04.1 LTS  
random-funcs:       srandom/random
regex-funcs:        internal
compiled limits:
sprintf buffer      8192
maximum-integer     2147483647
awk: /usr/bin/awk, mawk 1.3.4 20200120
curl: /usr/bin/curl, curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.13
wget: /usr/bin/wget, GNU Wget 1.21.2 built on linux-gnu.
git: /usr/bin/git, git version 2.34.1
ls: cannot access 'grep:': No such file or directory
grep: grep: aliased to grep --color=auto (grep --color=auto), grep (GNU grep) 3.7
sed: /usr/bin/sed, sed (GNU sed) 4.8
cut: /usr/bin/cut, cut (GNU coreutils) 8.32
basename: /usr/bin/basename, basename (GNU coreutils) 8.32
ls: cannot access 'rm:': No such file or directory
rm: rm: aliased to rm -i (rm -i), rm (GNU coreutils) 8.32
mkdir: /usr/bin/mkdir, mkdir (GNU coreutils) 8.32
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.8.0
nvm current: none
which node: node not found
which iojs: iojs not found
which npm: npm not found
npm config get prefix: nvm:271: command not found: npm
npm root -g: nvm:271: command not found: npm

nvm ls output:

            N/A
iojs -> N/A (default)
node -> stable (-> N/A) (default)
unstable -> N/A (default)
lts/* -> lts/hydrogen (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.21.2 (-> N/A)
lts/gallium -> v16.19.0 (-> N/A)
lts/hydrogen -> v18.12.1 (-> N/A)

How did you install nvm?

install script in readme

What steps did you perform?

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

What happened?

$ nvm install node
[... tons of variable values printed to the console ...]
Binary download failed, trying source.
Local cache found: ${NVM_DIR}/.cache/src/node-v19.3.0/node-v19.3.0.tar.xz
Checksums match! Using existing downloaded archive ${NVM_DIR}/.cache/src/node-v19.3.0/node-v19.3.0.tar.xz
nvm: install v19.3.0 failed!

What did you expect to happen?

Latest node version gets installed.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 23 (9 by maintainers)

Most upvoted comments

Sorry, my mistake, I did not copy the first character of alwaystoend

I tried first in a real terminal. πŸ˜ƒ Only tried in vscode too, because it was easier to copy from there.

Tried installing both 16 and 18, but got the same result.

ahhh - it’s probably the L alias, which means this was a duplicate of #2963 πŸ˜ƒ

Still not working 😦

Let me create a gist and share the tons of log with you, maybe you can make sense of it.