我试图在Linux上使用基于ctypes
的librsync
包装器,它安装在非标准路径中。然而:
----> 1 import librsync
/home/ptest/lib/python2.7/site-packages/librsync/__init__.py in <module>()
11 path = ctypes.util.find_library('rsync')
12 if path is None:
---> 13 raise ImportError('Could not find librsync, make sure it is installed')
14 try:
15 _librsync = ctypes.cdll.LoadLibrary(path)
ImportError: Could not find librsync, make sure it is installed
LD_LIBRARY_PATH
已被设定,但ctypes
似乎不尊重它。搜索提出了沿着这条线提出的许多问题,但我似乎无法找到解决方案。有帮助吗?
之前这样做:
sudo apt-get install librsync-dev