error while loading shared libraries Linux Origin: Platform & cloud Last updated 13 Oct 2026

error while loading shared libraries: libX.so.N: cannot open shared object file: No such file or directory

The program needs a shared library (.so) that isn’t installed or isn’t on the loader’s search path.

Exact message you may see error while loading shared librariescannot open shared object file: No such file or directorynot found (ldd)
Seen on: Linux

Meaning

Binaries are linked against specific library versions (libssl.so.1.1, libffi.so.7). After an OS upgrade or on a minimal image, the version may be missing. Libraries installed to /usr/local/lib may need ldconfig or LD_LIBRARY_PATH.

Common causes

  • Library package not installed (minimal image/container)
  • Program built for an older/newer distro version
  • Library in a non-standard path without ldconfig
  • 32-bit program missing 32-bit libraries

⚡ Quick fix

  1. Find which package provides it (apt-file search / dnf provides)
  2. Install the matching version or rebuild the program
  3. Run sudo ldconfig after installing into /usr/local/lib

Detailed fix by platform

Linux

  1. bash
    ldd ./myprogram | grep 'not found'
    sudo apt install apt-file && sudo apt-file update && apt-file search libssl.so.1.1
    sudo ldconfig

How to diagnose

  1. Missing — ldd output
  2. Version — Which version exists (ls /usr/lib/x86_64-linux-gnu | grep ssl)
  3. Path — ldconfig -p | grep name

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

Argument list too long — bash: /bin/rm: Argument list too long (Linux)Argument list too longCannot allocate memory — fork: Cannot allocate memory / ENOMEM (Linux)Cannot allocate memorycannot execute binary file — cannot execute binary file: Exec format error (Linux)cannot execute binary…command not found — bash: command not found (Linux)command not founddpkg lock — E: Could not get lock /var/lib/dpkg/lock-frontend — is another process using it? (Linux)dpkg lockdyld: Library not loaded — dyld: Library not loaded: @rpath/X.framework/X — Reason: image not found (crash on launch) (iOS)dyld: Library not loa…GLIBC_2.xx not found — /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (Linux)GLIBC_2.xx not foundGLIBCXX not found — Linux: version `GLIBCXX_3.4.30' not found (required by ./app) — libstdc++.so.6 (C/C++)GLIBCXX not founderror whi…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.