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)
有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top