python3 import。frida 报错?

>>> import frida

***
Failed to load the Frida native extension: dlopen(/Users/stephen/Library/Python/3.8/lib/python/site-packages/_frida.abi3.so, 2): no suitable image found.  Did find:
    /Users/stephen/Library/Python/3.8/lib/python/site-packages/_frida.abi3.so: mach-o, but wrong architecture
    /Users/stephen/Library/Python/3.8/lib/python/site-packages/_frida.abi3.so: mach-o, but wrong architecture
Please ensure that the extension was compiled correctly
***

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/stephen/Library/Python/3.8/lib/python/site-packages/frida/__init__.py", line 16, in <module>
    raise ex
  File "/Users/stephen/Library/Python/3.8/lib/python/site-packages/frida/__init__.py", line 4, in <module>
    import _frida
ImportError: dlopen(/Users/stephen/Library/Python/3.8/lib/python/site-packages/_frida.abi3.so, 2): no suitable image found.  Did find:
    /Users/stephen/Library/Python/3.8/lib/python/site-packages/_frida.abi3.so: mach-o, but wrong architecture
    /Users/stephen/Library/Python/3.8/lib/python/site-packages/_frida.abi3.so: mach-o, but wrong architecture
阅读 2.9k
2 个回答

看了下你的问题描述,在Python安装目录C:\Program Files\Python37\Lib\site-packages中未找到frida-12.4.0-py3.7-win-amd64.egg文件,该文件是运行frida所必需的。即使执行了"pip install frida"和"pip install frida-tools"命令,该文件也未被下载。
所以,我们需要手动下载这个文件,并将之前下载的frida egg文件复制到Python安装目录C:\Program Files\Python37\Lib\site-packages中。完成后,执行"frida-ps"命令,即可成功显示计算机当前进程。

系统是MacOS吗?

  • Macos电脑芯片现在有Arm架构和x86架构;如果电脑是m1,m2之类的芯片你需要下载arm架构的包;如果电脑用的是intel的芯片也就是是x86架构,你需要下载x86的包;
  • 你也下载把源码下载到自己本地自己编译;
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进