User Tools

Site Tools


programs:program_can_t_find_shared_library_at_run-time

This is an old revision of the document!


Programs - Program can't find Shared Library at run-time

Error received when trying to run a program, such as error while loading shared libraries.

Symlinks on libraries work fine, as long as the final target they trace to exists and is accessible.

Possible solutions include:

  • Create a symlink to libxyz* in a directory listed in /etc/ld.so.conf (or /lib or /usr/lib).
  • Copy libxyz* to a directory listed in /etc/ld.so.conf (or /lib or /usr/lib) (defaults).
  • Add the directory containing libxyz* to /etc/ld.so.conf.
  • Set LD_LIBRARY_PATH=/directory/path/to/libid3* before running your program.
  • Recompile program statically. (It will work, but don't bother.)

After any of the first 3, rerun ldconfig so the linker cache is updated. You can then run ldconfig -v to verify it's resolvable.

Solution 1

Add the directory containing the symbolic link to your LD_LIBRARY_PATH environment variable.

Solution 2

Try running ldconfig as root.

ldconfig>

This program makes a registry of available libraries used for runtime library loading. The trick is that the library has to be in a place that ldconfig expects to see it, which depends on the distribution. The list of library directories is usually in /etc/ld.so.conf or somewhere similar.

programs/program_can_t_find_shared_library_at_run-time.1483571501.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki