Skip to content

fix: install libatomic1 so bundled Node.js runs on linux/arm64 - #1

Merged
zyclonite merged 2 commits into
NoEnv:mainfrom
scauzhangpeng:fix/libatomic-arm64
Oct 2, 2026
Merged

zyclonite merged 2 commits into
NoEnv:mainfrom
scauzhangpeng:fix/libatomic-arm64

Conversation

@scauzhangpeng

Copy link
Copy Markdown
Contributor

On linux/arm64, the bundled Node.js (v26.2.0, official binary) links
against libatomic.so.1, which the Debian base image does not ship.
node -v fails with "cannot open shared object file: libatomic.so.1"
and sonar-scanner aborts with a misleading "A supported version of
Node.js is required".

Fix: install libatomic1.

Per the official Node.js BUILDING.md:

Starting with Node.js 25, official Linux binaries are linked with
libatomic and these systems must have the libatomic runtime installed
and available at execution time to run the binaries. The package name
for the libatomic runtime is typically libatomic or libatomic1
depending on your Linux distribution.

https://github.com/nodejs/node/blob/main/BUILDING.md

Testing

Verified on linux/arm64. Before the fix,
docker run --rm noenv/sonar-scanner:8.1.0 node -v fails with the
libatomic.so.1 load error. After the fix:

$ docker build -t sonar-scanner:8.1.0-libatomic .
$ docker run --rm sonar-scanner:8.1.0-libatomic sh -c "node -v && ldd \$(which node) | grep libatomic"
v26.2.0
libatomic.so.1 => /usr/lib/aarch64-linux-gnu/libatomic.so.1 (0x...)

Then ran sonar-scanner against a JavaScript/TypeScript project; Node
starts correctly and the scan completes end-to-end.

The second commit also fixes the cleanup step (duplicated rm -rf,
wrong temp file name node-linux.tar.xz → node-linux.tar.gz).

Node.js 25+ official Linux binaries are linked against libatomic,
which the Debian base image does not ship. Without it, node fails
with "cannot open shared object file: libatomic.so.1" and the
scanner aborts with a misleading "A supported version of Node.js
is required" error.

Reference: https://github.com/nodejs/node/blob/main/BUILDING.md
Remove the duplicated "rm -rf" and correct the temp file name
(node-linux.tar.xz -> node-linux.tar.gz) so the archive is actually
deleted.
@zyclonite zyclonite added the bug Something isn't working label Oct 2, 2026

@zyclonite zyclonite left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

thank you for the contribution

@zyclonite
zyclonite merged commit 499ee5a into NoEnv:main Oct 2, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
production — 4f7ab02b Deployed Oct 2, 2026 by scauzhangpeng via Publish images #47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants