因為在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
不然會出錯