DEV Community

Sitota Alemu
Sitota Alemu

Posted on • Edited on

Next.js with Docker setup error fixed

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)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series