python: symbol lookup error: undefined symbol: _ZN5Cairo7ContextC1EP6_cairob

Hi Tiago,

Thank you for the help so far. Carrying on the post from gitlab
( ) the problem seems to
not be solved yet.

I have set `export LD_LIBRARY_PATH="-L/home/pmj27/anaconda/lib"` in
`~/.bashrc` and `~/.profile`. If I type `echo $LD_LIBRARY_PATH` the shell
returns `-L/home/pmj27/anaconda/lib` as I would expect.

However, running `graph_draw` still returns the error `python: symbol lookup
undefined symbol: _ZN5Cairo7ContextC1EP6_cairob`.

Do you have any other thoughts on what might be going wrong here?

As mentioned, it was compiled using `sudo ./configure CXX="g++-5"
CXXFLAGS="-std=gnu++14 -Wno-unused-local-typedefs"

Best wishes,


This is incorrect. This environment variable expects a path, not compiler
flag. The correct would be:


(provided this is really where the cairo library resides)

Hi Tiago,

This doesn't seem to be doing it yet, the error persists. My ~/.profile now

    export LD_LIBRARY_PATH="/home/pmj27/anaconda/lib

(It contains boost from another installation too.) Do you know what the
library file I am looking for might be called?

On another machine where I have installed graph-tool using

    ./configure CXXFLAGS="-std=gnu++14 -Wno-unused-local-typedefs"

Setting export LD_LIBRARY_PATH="/home/pmj27/anaconda2/lib" in ~/.bashrc and
~/.profile then causes this error message from Nautilus:

    nautilus: symbol lookup error: /home/pmj27/anaconda2/lib/
undefined symbol: cairo_surface_set_device_scale

This is still wrong. Multiple paths should be separated with ":" not spaces.
Please read a bit on how shared library linking works on GNU/Linux,
otherwise we stay stuck on this game of whack-a-mole:

Thank you for that link, that was quite helpful.

I have set the entry to


This doesn't fix it though. It still breaks Nautilus and graph-tool still
returns the same error. I have also checked, a file called
"" resides inside "/home/pmj27/anaconda/lib". ""
resides in the same directory. Are these the correct files to be looking
for? I am really very sorry to be taking up your time with this!