What I faced
Hey guys, I was Setting up Next.js with Docker and I had faced several issues. One of the errors was docker couldn't able to load ld-linux-x86-64.so.2.
⚠ Attempted to load @next/swc-linux-x64-gnu, but an error occurred:
Error loading shared library ld-linux-x86-64.so.2: No such file or directory
(needed by /src/node_modules/@next/swc-linux-x64-gnu/next-swc.linux-x64-gnu.node)
Solution
The missing file ld-linux-x86-64.so.2 is part of glibc and some base images like alpine based one's doesn't include. This is a simplest error which is related to the docker image I was using. So I switched to Debian based Image and it worked.
Sources
The following youtube video helped me in the process of setting up.
link
That's it, thank you guys. Since I am in a hurry, I haven't articulated it well, might edit later.
Top comments (0)