Mac 10.15 下 python3 安装 cemu

记录一下 arm 汇编神器 cemu 在 mac 上的安装,踩了很多坑

 

mac 上官网的安装方式

$ brew install capstone
$ pip3 install -U cemu

由于 pip 上的的依赖没有更新,在安装时会遇到各种问题,主要就是库找不到,所以需要自己编译需要的库

先看看都需要什么依赖

❯ pip3 install cemu
Requirement already satisfied: cemu in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (0.5)
Requirement already satisfied: capstone>=3.0.4 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from cemu) (4.0.1)
Requirement already satisfied: unicorn>=1.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/unicorn-1.0.1-py3.7.egg (from cemu) (1.0.1)
Requirement already satisfied: PyQt5 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from cemu) (5.14.1)
Requirement already satisfied: Pygments>=2.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/Pygments-2.5.2-py3.7.egg (from cemu) (2.5.2)
Requirement already satisfied: lief in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/lief-0.10.1-py3.7-macosx-10.9-x86_64.egg (from cemu) (0.10.1)
Requirement already satisfied: keystone-engine>=0.9 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from cemu) (0.9.1.post3)
Requirement already satisfied: PyQt5-sip<13,>=12.7 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from PyQt5->cemu) (12.7.1)

下载的库有 cemu、capstone-3.0.4、unicorn-1.0.1、PtQt5、Pygments-2.0、lief、keystone-engine-9.1.3、PyQt5

这里面有问题的是 capstone、unicorn和keystone

编译需要 cmake 工具, 地址:https://cmake.org

1.编译 capstone 

git clone https://github.com/aquynh/capstone
cd capstone
mkdir build
cd build
cmake ..
make -j4
sudo make install
cd ../bindings/python
sudo make install3

2.编译 unicorn

git clone https://github.com/unicorn-engine/unicorn
cd unicorn
mkdir build
cd build
cmake ..
make -j4
sudo make install
cd ../bindings/python
sudo make install3

编译的时候会报错 config-host.h 找不到,在文件了搜一下就找到了,复制到对应文件夹下就好了

3.编译 keystone

git clone https://github.com/keystone-engine/keystone
cd keystone
mkdir build
cd build
../make-lib.sh
sudo make install
cd ./bindings/python
sudo make install
cd ./bindings/python
sudo make install

最后 

git clone https://github.com/yformaggio/cemu
cd cemu
python3 main.py

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值