cannot open shared object file: No such file or directory

I am using Anaconda as my main python distribution (though also have the
system's default python installed) so have to compile graph-tool from source
to get it to work with Anaconda. I am using Ubuntu 14.04 so also have to
compile boost from source to be able to use the full functionality of
graph-tool. I have done so and they have both installed without any error
messages, however, when then importing graph-tool in python using `from
graph_tool.all import *` I get the error message `ImportError: cannot open shared object file: No such file
or directory`.

How could I go about solving that problem/what is this caused by?

Best wishes,


Do you have in your anaconda/lib folder?

attachment.html (4.06 KB)

No, that file is in "/home/pmj27/software/boost_1_61_0/stage/lib".
anaconda/lib contains "" and

Having done some re-installing the problem still persists. The file in
question is in the folder "/home/pmj27/software/boost_1.61/lib". During
./configure I did however provide that path as
LDFLAGS="-L/home/pmj27/software/boost_1.61/lib". Does anybody know where I
am going wrong?

Is the above path also in your LD_LIBRARY_PATH? Otherwise the linker
will not find it.


How would I check this/how would I add it? I haven't added it manually so
this may be the cause.




attachment.html (6.51 KB)

It is an environment variable. You check it with


and you set it with

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/pmj27/software/boost_1.61/lib

I have done that. It didn’t work though. I have set the path in .bashrc too so typing echo $LD_LIBRARY_PATH returns /home/pmj27/software/boost_1.61/lib but the problem still persists unfortunately.

Best wishes,


attachment.html (6.62 KB)

This is all very simple, if it can't find the library object file, it
must be because the path is wrong. In a previous email, you said the
library file was in: /home/pmj27/software/boost_1_61_0/stage/lib, which
is different from the above. Just find the correct directory where the
library is and it must work.

I have re-installed boost since that email. Typing “sudo find $HOME -name ''” into the terminal returns:



So it definitely exists in “/home/pmj27/software/boost_1.61/lib” but isn’t being picked up.



attachment.html (7.55 KB)

As I see it, there are two options: (a) either your system is broken at
a fundamental level or (b) there is an inconsistency with your paths. I
think (b) is more likely.

Another possibility is that anaconda is somehow interfering with the

Thank you for the help so far! I’m not sure my expertise is great enough to debug this so I have deleted that installation of graph-tool and instead set up a virtual environment where I have linked to the apt-get version of graphtool ( ). That seems to import (mostly) fine.



attachment.html (6.7 KB)