Repository navigation
Closed
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
NPM 11.6.2, as installed with Node 25.0.0 according to the official docs, does not run on ubuntu (tested 24.04, 25.10). Instead running any command results in the error message "node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory".
Npm 11.6.1, as installed with node 24.10.0, works without issues.
Note that I'm unsure whether to file this with npm or nvm. If you feel this should be an issue with nvm instead let me know.
Expected Behavior
NPM successfully starts and executes commands on Ubuntu 25.10
Steps To Reproduce
If you have access to docker the following steps always reproduce the issue for me:
- Start a container with ubuntu 25.10
docker run -it --rm ubuntu:25.10 /bin/bash
- Install curl
apt-get update && apt-get -y install curl
- Install nvm as suggested in the docs according to the nvm install instructions
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"
- Use nvm to install npm
nvm install 25.0.0
- Run any npm command
npm --version
- Npm fails with "node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory"
Environment
- npm: 11.6.2
- Node.js: 25.0.0
- OS Name: Ubuntu 25.10 (or 24.04)
- System Model Name: VMware Virtual Platform
- npm config (Note: this only prints after manually installing
libatomic1, prior to that it shows the same error as above)
; node bin location = /root/.nvm/versions/node/v25.0.0/bin/node
; node version = v25.0.0
; npm local prefix = /
; npm version = 11.6.2
; cwd = /
; HOME = /root
; Run `npm config ls -l` to show all defaults.Reacted by plozy and Raheel Hasan
Activity
[-][BUG] NPM 25.0.0 does not run on Ubuntu[/-][+][BUG] NPM 11.6.2 does not run on Ubuntu[/+]Tejas242 commentedon Oct 18, 2025
If I am not wrong, this appears to be a Node.js system dependency issue rather than an npm bug.
Singh7Gurpreet commentedon Nov 14, 2025
Yes, it is system dependency issue rather than an npm bug it can be solved with this command it installs the required dependency.
sudo apt install libatomic1
This issue should be closed.
1dEraNCeSIv0 commentedon Nov 14, 2025
To the best of my knowledge, this problem could be solved by either of node / npm / nvm / ubuntu / me. It's not hard to install
libatomic1, but it's unclear that this is best done by the end user.I have assumed - perhaps wrongly - that between node / npm / nvm the intention is to provide some sort of a plug-and-play experience, on major distros at least. That is, you install nvm, you tell it what node version you want, and that's that, you can go and use npm now. This is how the npm docs instruct you to install npm, too.
Of course I can just install all libs npm required prior to installing node, and if that's the way it's supposed to go I will without complaint.
But under the assumption that node / npm / nvm / somebody in the ecosystem actively wants to provide the plug-and-play experience, I thought it helpful to let them know that it's currently broken on ubuntu, a major linux distro.
Feel free to close if that turns out to be a mistaken assumption on my part.
Singh7Gurpreet commentedon Nov 14, 2025
Well, I agree with your assumption end user should not worry about these kind of dependencies it should be plug and play but I am seeing in nvm.sh in NVM github that where it checks for wget,curl or git if none of it is installed it simply exits with this message "nvm_echo >&2 'You need git, curl, or wget to install nvm'
exit 1"
And I am assuming this thing has to be taken care by ubuntu itself when using apt install it takes care of dependencies one needs to install that particular package.
NOTE: I am very new to these open source projects feel free to correct me.
1dEraNCeSIv0 commentedon Nov 18, 2025
According to this node issue the dependency on libatomic is now a known requirement for installing node (as of v25). And with 25.2.0 it's also finally made it into the docs!
I'm closing this since it seems that if npm is going to run after a
nvm install nodeon Ubuntu again it's going to require changes with either node, nvm or ubuntu but probably not npm.I maintain that following the current version of the how-to-install-npm docs will fail on current ubuntu images, but whatever.