Error while loading shared libraries: libdb_cxx-4.8.so
I'm trying to execute a program but got the error
error while loading shared libraries: libdb_cxx-4.8.so: cannot open shared object file: No such file or directory
Is there a way to find out how to fix it?
Thank you!
you may want to try and locate it first
find ~ / -name *libdb*
ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf
apt-cache search libdb
apt-get install libdb5.3++-dev libdb++-dev libdb5.3-dev libdb-dev && ldconfig
LD_LIBRARY_PATH is the predefined environmental variable in Linux/Unix which sets the path which the linker should look in to while linking dynamic libraries/shared libraries.
export LD_LIBRARY_PATH="/list/of/library/path"
The LD_PRELOAD allow an extra library not specified in the executable to be loaded:
export LD_PRELOAD="/list/of/library/path"
ldd checks the (so) shared library files for any missing dependencies
ldd /usr/lib/x86_64-linux-gnu/libdb-5.3.so
if you're installing it with a package use:
./configure --prefix=/usr/local --enable-cxx