首页 > 解决方案 > RZpipe 抛出 OSError

问题描述

我正试图让 rzpipe 与 rizin 交谈。我遵循了 pypi中的“hello world”示例,但它抛出了一个 OSError。我错过了什么?

蟒蛇脚本

import rzpipe

pipe = rzpipe.open("/bin/ls")
pipe.cmd('aa')
print(pipe.cmd("afl"))
print(pipe.cmdj("aflj"))            # evaluates JSON and returns an object
print(pipe.cmdj("ij").core.format)  # shows file format
pipe.quit()

输出

Traceback (most recent call last):
  File "/home/test/code.py", line 1, in <module>
    import rzpipe
  File ".../python3.8/site-packages/rzpipe/__init__.py", line 38, in <module>
    from .open_sync import open
  File ".../python3.8/site-packages/rzpipe/open_sync.py", line 16, in <module>
    from .open_base import OpenBase
  File ".../python3.8/site-packages/rzpipe/open_base.py", line 22, in <module>
    from .native import RCore
  File ".../python3.8/site-packages/rzpipe/native.py", line 25, in <module>
    lib = CDLL(lib_name)
  File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: librz_core.so.0.3.0-git: cannot open shared object file: No such file or directory

附加信息

$ pip freeze | grep rzpipe
rzpipe==0.1.0

$ python --version
Python 3.8.10

$ rizin -v
rizin 0.3.0-git @ linux-x86-64
commit: cb9dc468871fee164e1dfed83fa75d8cf49c8beb, build: 2021-07-13__10:18:01

$ uname -a
Linux ubuntu-comp 5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

标签: python-3.x

解决方案


推荐阅读