Skip to content

Did you know?

Node.js 26 binaries won't start on minimal Linux images without libatomic.

Seeing "libatomic.so.1: cannot open shared object file"? Install the library; no Node.js reinstall needed.

  • Programming
  • Applies to Node.js 26
  • Last checked

Explained

The official Node.js 26 builds, which NVM and the nodejs.org tarballs install, are linked against libatomic, a small GCC runtime library. Full desktop installations usually have it, but minimal server images, cloud images and Docker base images such as debian:13, ubuntu:26.04 and amazonlinux:2023 don’t. Node.js then installs fine but fails the first time you run it:

node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

Install the library from your distribution’s repositories. On Debian and Ubuntu:

sudo apt install -y libatomic1

On Amazon Linux 2023, Fedora and RHEL-based systems:

sudo dnf install -y libatomic

Run node -v again and it works; the installed Node.js version doesn’t need to be reinstalled. In a Dockerfile, add the package in the same RUN step that installs Node.js so your image builds don’t break.

Learn more

← All tech tips · Suggest a fix

Back to top