MacOS下安装unicorn这个库失败

因为在Mac下安装pwntools,发现安装unicorn库的时候失败了,编译报错如下

    make: *** [qemu/config-host.h-timestamp] Error 1
    error: [Errno 2] No such file or directory: 'libunicorn.dylib'
    ----------------------------------------

那怎么办呢,你能帮帮我吗?
手动安装方法如下:

1 安装unicorn

> brew install unicorn

2 在PyPi下载unicorn源码并安装

链接:https://pypi.org/project/unicorn/#files

> tar -zxf unicorn-1.0.1.tar.gz
> cd unicorn-1.0.1
> cp /usr/local/opt/unicorn/lib/lib* ./prebuilt
> python3 setup.py install

然后就可以了,其实问题的原因是python装unicorn的时候没有找见unicorn的这个库libunicorn.dylib
参考:https://blog.csdn.net/weixin_33853827/article/details/91391206

注意: python3安装pwntools不要直接pip,要用官方的方法:https://github.com/arthaud/python3-pwntools/issues/3
不然会出错

posted @ 2019-12-05 21:03  flatcc  阅读(1584)  评论(0编辑  收藏  举报