Question

I'm running Debian 6.0.6

I've downloaded latest version of libtorrent-rasterbar from here: http://code.google.com/p/libtorrent/downloads/detail?name=libtorrent-rasterbar-0.16.6.tar.gz&can=2 and installed it:

./configure --enable-python-binding
make
make install
cd bindings/python
python setup.py build
python setup.py install

now I want to test whether the library works:

>>> import libtorrent
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libtorrent-rasterbar.so.7: cannot open shared object file: No such file or directory

The packaged version of libtorrent from the distributive's repository had some funny behaviour (complaining on boost dependences), so I've decided to upgrade. The same situation is on both of my debian boxes, yet ubuntu box is fine.

old error message from my debian box:

  File "ar.py", line 15, in create
    s.start_dht()
Boost.Python.ArgumentError: Python argument types in
    session.start_dht(session)
did not match C++ signature:
    start_dht(libtorrent::session {lvalue}, libtorrent::entry)
Was it helpful?

Solution

Search for the shared object file and add it to your path.

sudo updatedb
locate libtorrent-rasterbar.so.7

This should output /<path_to_directory>/libtorrent-rasterbar.so.7

Add this to your ~/.profile or temporarily tell Python where to look:

export LD_LIBRARY_PATH=/<path_to_directory>/

See more detailed installation instructions here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top