From 7d96764cae89c74b2f172b9046694e4c19e796a9 Mon Sep 17 00:00:00 2001 From: Jesse Zhu Date: Sat, 23 May 2026 01:35:12 +0900 Subject: [PATCH] [Fix] support arm64-musl on Alpine Linux Node.js unofficial-builds publishes linux-arm64-musl binaries since v20.20.1 / v22.21.1 / v24+. Map NVM_ARCH=arm64 to arm64-musl on Alpine so `nvm install` resolves to the correct tarball instead of the glibc-linked arm64 build that won't run against musl. --- nvm.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 295703c297..dcac6a4bab 100755 --- a/nvm.sh +++ b/nvm.sh @@ -2176,9 +2176,11 @@ nvm_get_arch() { fi if [ -f "/etc/alpine-release" ]; then - # Alpine Linux uses musl libc; only x64-musl binaries are available + # Alpine Linux uses musl libc; map to musl variants where available + # See https://unofficial-builds.nodejs.org/download/release/ case "${NVM_ARCH}" in x64) NVM_ARCH=x64-musl ;; + arm64) NVM_ARCH=arm64-musl ;; esac fi