libboost_iostreams.so.1.61.0: 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:
libboost_iostreams.so.1.61.0: 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,

Philipp

Do you have libboost_iostreams.so.1.61.0 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 "libboost_iostreams.so.1.58.0" and
"libboost_iostreams.so".

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.

Best,
Tiago

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

Best,

Philipp

[mailto:ml-node+s982480n4026612h70(a)n3.nabble.com]

attachment.html (6.51 KB)

It is an environment variable. You check it with

    echo $LD_LIBRARY_PATH

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,

Philipp

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 'libboost_iostreams.so.1.61.0'” into the terminal returns:

/home/pmj27/software/boost_1.61/bin.v2/libs/iostreams/build/gcc-5.3.0/release/threading-multi/libboost_iostreams.so.1.61.0

/home/pmj27/software/boost_1.61/lib/libboost_iostreams.so.1.61.0

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

Best,

Philipp

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
loader...

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 (http://damcb.com/setting-up-a-scientific-python-working-environment.html ). That seems to import (mostly) fine.

Best,

Philipp

attachment.html (6.7 KB)