Personal tools

Ldconfig

From MohidWiki

Jump to: navigation, search

Getting the following error?:

error while loading shared libraries

Here's how to solve the problem. In order to add a shared library in your linux environment perform the following steps:

  • Locate with find the emplacement of the shared object. We'll call it herein lib.so.
> find / | grep lib.so
  • Go to /usr/lib:
> cd /usr/lib
> ln -s $LOCATION/lib.so.0.0.0 lib.so
> ln -s $LOCATION/lib.so.0.0.0 lib.so.0
  • Reload the library cache
> /sbin/ldconfig

If you get permissions denied, then perform the commands with sudo in front.