我运行的是Debian 6.0.6
我已经从这里下载了最新版本的libtorrent-rasterbar:http://code.google.com/p/libtorrent/downloads/detail?name=libtorrent-rasterbar-0.16.6.tar.gz&can=2并安装了它:
./configure --enable-python-binding
make
make install
cd bindings/python
python setup.py build
python setup.py install现在我想测试一下这个库是否工作正常:
>>> 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来自发行商的仓库的libtorrent的打包版本有一些有趣的行为(抱怨boost依赖),所以我决定升级。
来自我的debian机器的旧错误信息:
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)发布于 2013-03-28 09:48:24
搜索共享目标文件并将其添加到您的路径中。
sudo updatedb
locate libtorrent-rasterbar.so.7这应该会输出/<path_to_directory>/libtorrent-rasterbar.so.7
将这段代码添加到您的~/.profile中,或者临时告诉Python在哪里查找:
export LD_LIBRARY_PATH=/<path_to_directory>/请参阅更详细的安装说明here。
https://stackoverflow.com/questions/14047653
复制相似问题