Failure to load boost libraries on Linux

Hi Please will some one help me with what is probably a simple Linux error? I have installed Boost 1.40 on Centos 5.3 using an rpm from blackopsoft.com. When I run my executable I get: Failed to load the following library files: [snip] dlerror = libboost_python.so.2: cannot open shared object file: No such file or directory Executing: /sbin/ldconfig -p | grep boost gives: libboost_python-mt.so.1.40.0 (libc6,x86-64) => /usr/lib64/libboost_python-mt.so.1.40.0 libboost_python-mt.so (libc6,x86-64) => /usr/lib64/libboost_python-mt.so libboost_python-mt-d.so.1.40.0 (libc6,x86-64) => /usr/lib64/libboost_python-mt-d.so.1.40.0 libboost_python-mt-d.so (libc6,x86-64) => /usr/lib64/libboost_python-mt-d.so Please can anyone suggest what is wrong? Best regards David

David Aldrich wrote:
Hi
Please will some one help me with what is probably a simple Linux error?
I have installed Boost 1.40 on Centos 5.3 using an rpm from blackopsoft.com.
When I run my executable I get:
Failed to load the following library files: [snip] dlerror = libboost_python.so.2: cannot open shared object file: No such file or directory
Executing:
/sbin/ldconfig -p | grep boost
gives:
libboost_python-mt.so.1.40.0 (libc6,x86-64) => /usr/lib64/libboost_python-mt.so.1.40.0 libboost_python-mt.so (libc6,x86-64) => /usr/lib64/libboost_python-mt.so libboost_python-mt-d.so.1.40.0 (libc6,x86-64) => /usr/lib64/libboost_python-mt-d.so.1.40.0 libboost_python-mt-d.so (libc6,x86-64) => /usr/lib64/libboost_python-mt-d.so
Please can anyone suggest what is wrong?
Your executable is linked against something that is not system-wide boost on your machine. Probably, it is linked on a different machine, where boost libraries are named in a different way. Boost, when built from official release, will never create a library named libboost_python.so.2 - Volodya

At Mon, 26 Jul 2010 11:28:22 +0100, David Aldrich wrote:
Please will some one help me with what is probably a simple Linux error?
I have installed Boost 1.40 on Centos 5.3 using an rpm from blackopsoft.com.
When I run my executable I get:
Failed to load the following library files: [snip] dlerror = libboost_python.so.2: cannot open shared object file: No such file or directory
Executing:
/sbin/ldconfig -p | grep boost
gives:
libboost_python-mt.so.1.40.0 (libc6,x86-64) => /usr/lib64/libboost_python-mt.so.1.40.0 libboost_python-mt.so (libc6,x86-64) => /usr/lib64/libboost_python-mt.so libboost_python-mt-d.so.1.40.0 (libc6,x86-64) => /usr/lib64/libboost_python-mt-d.so.1.40.0 libboost_python-mt-d.so (libc6,x86-64) => /usr/lib64/libboost_python-mt-d.so
Please can anyone suggest what is wrong?
Looks like your application is trying to load the single-threaded version of libboost_python but you don't have it installed? -- Dave Abrahams BoostPro Computing http://www.boostpro.com

Hi Dave
Looks like your application is trying to load the single-threaded version of libboost_python but you don't have it installed?
In my makefile I simply specify: LIBDEPEND+=-lboost_python LIBDEPEND+=-lpython2.4 g++ -shared -o [snip (object files)] $(LIBDEPEND) How would I link to the multi-threaded library instead please? David
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of David Abrahams Sent: 26 July 2010 15:18 To: boost-users@lists.boost.org Subject: Re: [Boost-users] Failure to load boost libraries on Linux
At Mon, 26 Jul 2010 11:28:22 +0100, David Aldrich wrote:
Please will some one help me with what is probably a simple Linux error?
I have installed Boost 1.40 on Centos 5.3 using an rpm from
blackopsoft.com.
When I run my executable I get:
Failed to load the following library files: [snip] dlerror = libboost_python.so.2: cannot open shared object file: No such
file or directory
Executing:
/sbin/ldconfig -p | grep boost
gives:
libboost_python-mt.so.1.40.0 (libc6,x86-64) =>
/usr/lib64/libboost_python-mt.so.1.40.0
libboost_python-mt.so (libc6,x86-64) =>
/usr/lib64/libboost_python-mt.so
libboost_python-mt-d.so.1.40.0 (libc6,x86-64) =>
/usr/lib64/libboost_python-mt-d.so.1.40.0
libboost_python-mt-d.so (libc6,x86-64) =>
/usr/lib64/libboost_python-mt-d.so
Please can anyone suggest what is wrong?
Looks like your application is trying to load the single-threaded version of libboost_python but you don't have it installed?
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Click https://www.mailcontrol.com/sr/Q1s3RhWRn5LTndxI!oX7UoEGNNKKZK+egSR1Puu45hj G5YPnH6Kw6UsjnabFbGHoce4U1KuAlzpLwdQMGDtFKA== to report this email as spam.

On Mon, 2010-07-26 at 11:28 +0100, David Aldrich wrote:
Hi
Please will some one help me with what is probably a simple Linux error?
I have installed Boost 1.40 on Centos 5.3 using an rpm from blackopsoft.com.
When I run my executable I get:
Failed to load the following library files: [snip] dlerror = libboost_python.so.2: cannot open shared object file: No such file or directory
Executing:
/sbin/ldconfig -p | grep boost
gives:
libboost_python-mt.so.1.40.0 (libc6,x86-64) => /usr/lib64/libboost_python-mt.so.1.40.0 libboost_python-mt.so (libc6,x86-64) => /usr/lib64/libboost_python-mt.so libboost_python-mt-d.so.1.40.0 (libc6,x86-64) => /usr/lib64/libboost_python-mt-d.so.1.40.0 libboost_python-mt-d.so (libc6,x86-64) => /usr/lib64/libboost_python-mt-d.so
Please can anyone suggest what is wrong?
Best regards
David
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Personally I would build it from source. Its very easy on Linux. You can just download the tarball from boost.org and follow the guide on the site on how to build it.
From the looks of the error message I cannot say for sure what is going on. Can you post the entire message? I would say off the start its looking for the non-multithreaded version.
Stephen

Hi Thanks for all your replies and help. I simply needed to specify: -lboost_python-mt instead of: -lboost_python Sorry, I should have realised that much earlier. David
participants (4)
-
David Abrahams
-
David Aldrich
-
storri
-
Vladimir Prus