I'm trying to compile and install boost 1.54 from source in CentOS.
The documentation is pretty straight forward and there are plenty of tutorials in the internet available (1) (2) (3). This is what I did:
wget http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz
tar -xzvf boost_1_54_0.tar.gz
cd boost_1_54_0
./bootstrap.sh --prefix=/usr/local
./b2 install --with=all
This is compiling and installing boost correctly to /usr/local/lib
and everything looks fine.
Now I compile other software that requires boost using gcc
and everything works fine. From my understanding everything should be OK as long as gcc
finds the required libs.
But now the problem: If I run my compiled binaries I get the following error:
./myProgram
./myProgramm: error while loading shared libraries: libboost_system.so.1.54.0: cannot open shared object file: No such file or directory
Why can the libraries not be found?
In addition I tried:
ldconfig
locate boost
[...]
But boost libraries can not be found. I've looked for the path manually, it is:
/usr/local/lib/libboost_system.so.1.54.0
I also tried to create symlinks to /usr/lib
but this doesn't fix this either.
Any ideas? What can I do?