Skip to content

nvm-installed node/npm fails all commands on ubuntu due to missing lib #3711

Closed

Description

@1dEraNCeSIv0

Summary

When using nvm 0.40.3 to install node 25.0.0 or higher on recent Ubuntu images, the resulting installation fails to run any node or npm commands.

I'm not 100% sure nvm is the correct place to open this issue, from my perspective the problem can probably be solved be any of node, npm, nvm, ubuntu or the end user. I assume it is best solved by either node, npm or nvm, but since the corresponding npm issue has had no reply by the npm team I'm assuming they believe it's not their responsibility, hence me opening an issue here instead.

If you feel this issue does not belong with nvm, let me know where you believe it belongs, it's my assumption that node / npm "just working" on Ubuntu after nvm install node is desired by either node, npm or nvm.

Operating system and version:

Ubuntu. I tested 24.04, 25.10 and 26.04 and they all exhibit this behavior. The outputs in the remainder of this will be from 25.10. All tests were done using docker run -it --rm ubuntu:<version> /bin/bash.

nvm debug output:

Details
nvm --version: v0.40.3
$SHELL: /bin/bash
$SHLVL: 1
whoami: 'root'
${HOME}: /root
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${NVM_DIR}/versions/node/v25.2.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu)'
uname -a: 'Linux 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64 GNU/Linux'
checksum binary: 'sha256sum'
OS version: Ubuntu 25.10
awk: /usr/bin/awk, mawk 1.3.4 20250131
curl: /usr/bin/curl, curl 8.14.1 (x86_64-pc-linux-gnu) libcurl/8.14.1 OpenSSL/3.5.3 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.2 libssh2/1.11.1 nghttp2/1.64.0 librtmp/2.3 OpenLDAP/2.6.10
wget: not found
git: not found
grep: /usr/bin/grep (grep --color=auto), grep (GNU grep) 3.11
sed: /usr/bin/sed, sed (GNU sed) 4.9
cut: /usr/bin/cut, cut (uutils coreutils) 0.2.2
basename: /usr/bin/basename, basename (uutils coreutils) 0.2.2
rm: /usr/bin/rm, rm (GNU coreutils) 9.5
mkdir: /usr/bin/mkdir, mkdir (uutils coreutils) 0.2.2
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.10.0
nvm current: none
which node: ${NVM_DIR}/versions/node/v25.2.1/bin/node
which iojs:
which npm: ${NVM_DIR}/versions/node/v25.2.1/bin/npm
npm config get prefix: node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory
npm root -g: node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

nvm ls output:

Details
        v25.2.1
default -> node (-> v25.2.1)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v25.2.1) (default)
stable -> 25.2 (-> v25.2.1) (default)
lts/* -> lts/krypton (-> 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.3 (-> N/A)
lts/gallium -> v16.20.2 (-> N/A)
lts/hydrogen -> v18.20.8 (-> N/A)
lts/iron -> v20.19.5 (-> N/A)
lts/jod -> v22.21.1 (-> N/A)
lts/krypton -> v24.11.1 (-> N/A)

How did you install nvm?

Following the (as of 18.11.25) current installation instructions in the readme of this repository:

apt-get update && apt-get -y install curl
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

What steps did you perform?

  1. Installed nvm following the steps above
  2. Installed node 25.0.0 (or 25.1.0, 25.2.1) using nvm install 25.0.0
  3. Ran node --version (or npm --version)

What happened?

Steps 1 & 2 seemed to complete successfully
Step 3 printed "node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory"

What did you expect to happen?

I expected it to print the node/npm version. More specifically, I expected any node/npm command to work and all required system dependencies to be installed.

Is there anything in any of your profile files that modifies the PATH?

I don't believe so. I've used unmodified ubuntu images from the docker registry for reproduction, unless these come with the PATH pre-modified.

Activity

  1. changed the title [-]nvm-installed npm fails all commands on ubuntu due to missing lib[/-] [+]nvm-installed node/npm fails all commands on ubuntu due to missing lib[/+] on Nov 18, 2025
  2. shawnnolanjr commented on Nov 18, 2025

    @shawnnolanjr

    today all of a sudden i wasn't able to use nestjs commands, and i'm not sure if this is the place either, but after trying to reinstall nvm i get

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100    14  100    14    0     0     43      0 --:--:-- --:--:-- --:--:--    44
    bash: line 1: 404:: command not found
    
  3. 1dEraNCeSIv0 commented on Nov 18, 2025

    @1dEraNCeSIv0
    Author

    Seems like a different issue, downloading and installing nvm works without problems for me.

  4. ljharb commented on Nov 19, 2025

    @ljharb
    Member

    That is an issue with node, specifically, not npm or nvm, so node would be the place to file it.

  5. 1dEraNCeSIv0 commented on Nov 19, 2025

    @1dEraNCeSIv0
    Author

    Thanks for the fast response, will do.

  6. shawnnolanjr commented on Nov 19, 2025

    @shawnnolanjr

    Seems like a different issue, downloading and installing nvm works without problems for me.

    I didn't realize that 20% of the internet was down at the time of writing, that was the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions