Skip to content

node fails with libatomic.so.1: cannot open shared object file on minimal AlmaLinux/RHEL 9 #1569

Description

@huangsen365

What happened

After installing Node via fnm on a minimal AlmaLinux 9 image, running node fails immediately:

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

The fnm-managed Node binary links against libatomic.so.1, which is not present by default on minimal AlmaLinux/RHEL 9 (and likely other minimal RHEL-family) installs.

Environment

  • fnm: 1.39.0
  • Node: v26.3.1 (installed via fnm install)
  • OS: AlmaLinux 9.8 (Olive Jaguar), x86_64

Workaround

dnf install -y libatomic && ldconfig

After this, ldd $(which node) resolves libatomic.so.1 and node -v works.

Suggestion

This is a confusing failure because fnm reports a successful install, but the binary can't run. A couple of options the team might consider:

  1. Document the libatomic prerequisite for RHEL-family/minimal distros in the install/troubleshooting docs.
  2. Surface a clearer error / pre-flight check — e.g. detect a missing libatomic.so.1 after install and print a hint with the dnf install libatomic fix, rather than letting the raw loader error surface only when the user runs node.

Happy to provide more details if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions