next.js: Error loading shared library ld-linux-x86-64.so.2 on Alpine
What version of Next.js are you using?
12.0.2
What version of Node.js are you using?
16.x
What browser are you using?
none
What operating system are you using?
alpine
How are you deploying your application?
next build
Describe the Bug
next 12.0.2 app is failing to build on Alpine linux with following error. It was first appeared in 12.0.0, then fixed in 12.0.1. Now it’s back in 12.0.2.
Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by ....)
Expected Behavior
next build should work
To Reproduce
create next app using 12.0.2, then try to build on Alpine linux.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 20
- Comments: 44 (15 by maintainers)
Commits related to this issue
- Fix #30713 — committed to kdy1/next.js by kdy1 3 years ago
- Downgrading to next@12.0.1 due to https://github.com/vercel/next.js/issues/30713 — committed to sthlmio/web by larsha 3 years ago
- Keep attempting to load binary files after failure (#30755) Multiple binaries may be installed when only one of them will work with the host machine (limitation of `optionalDependencies`). Failing to... — committed to vercel/next.js by padmaia 3 years ago
- Keep attempting to load binary files after failure (#30755) Multiple binaries may be installed when only one of them will work with the host machine (limitation of `optionalDependencies`). Failing to... — committed to timneutkens/next.js by padmaia 3 years ago
- Update next js Solves: https://github.com/vercel/next.js/issues/30713 — committed to labelflow/labelflow by RaynalHugo 3 years ago
- Update next js Solves: https://github.com/vercel/next.js/issues/30713 — committed to labelflow/labelflow by RaynalHugo 3 years ago
- Keep attempting to load binary files after failure (#30755) Multiple binaries may be installed when only one of them will work with the host machine (limitation of `optionalDependencies`). Failing to... — committed to natew/next.js by padmaia 3 years ago
Thanks for confirming @mtsewrs, we’ll get it out on stable soon (today/tomorrow) 👍 Going to close this issue as we close issues when the fix has landed 👍
Can this be re-opened?
on 12.0.2 Docker image: node:14.18.1-alpine
This is still occurring in
v12.0.4
for node-14 docker image.@degitgitagitya You can remove
node_modules/@next/swc-linux-x64-gnu
as a workaround.This issue is still occurring for me … I tried all suggestions in convos above and some mixtures of them, etc
This is now fixed on next@canary, please give it a try!
Verified based on the Dockerfile shared in this comment: https://github.com/vercel/next.js/issues/30713#issuecomment-959134683
This issue needs to be reopened, vercel pipeline still crashes when building next on 12.0.7.
@timneutkens I am still getting this error on
Next@12.0.3
deploying on Vercel, after a clean install on macOSEDIT
After another clean install && push it works
@kdy1 So I’m using a docker container to build
node:16-alpine
so it seems to be an issue with alpine, works perfect locally on linux