keystone icon indicating copy to clipboard operation
keystone copied to clipboard

Keystone Engine failed to locate libkeystone.so on Ubuntu 20.04

Open peternguyen93 opened this issue 4 years ago • 2 comments

Python 3.8.2 (default, Apr 27 2020, 15:53:34)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import keystone
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/keystone/__init__.py", line 4, in <module>
    from .keystone import Ks, ks_version, ks_arch_supported, version_bind, debug, KsError, __version__
  File "/usr/local/lib/python3.8/dist-packages/keystone/keystone.py", line 75, in <module>
    raise ImportError("ERROR: fail to load the dynamic library.")
ImportError: ERROR: fail to load the dynamic library.

The code only look for this directory: /usr/local/lib/python3.8/dist-packages/keystone/ but actually libkeystone.so located at /usr/local/lib/python3.8/dist-packages/usr/lib/python3/dist-packages/keystone/libkeystone.so

peternguyen93 avatar May 15 '20 07:05 peternguyen93

does this still happen on the latest github code?

aquynh avatar May 15 '20 09:05 aquynh

we made some fixes on setup.py. you can reinstall Python binding with:

cd bindings/python
sudo make install3

you may want to try again now?

aquynh avatar Jun 10 '20 08:06 aquynh