前言
问题出现
近期在研究动态链接库的跨平台汇编时,用到了keystone-engine这个库。
发现直接在python里输入pip install 出现如下异常信息:
pip install keystone-engine
错误信息:
'..' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
running install_lib
warning: install_lib: byte-compiling is disabled, skipping.
running install_data
error: can't copy 'src\build\llvm\lib\libkeystone.so': doesn't exist or not a regular file
搜索方案
在谷歌上搜索关键字 warning: install_lib: byte-compiling is disabled, skipping.
发现几个可用答案:
1.
python安装库报 error: can’t copy ‘src/build/llvm/lib/libkeystone.so’
手动编译源码安装
$ git clone https://github.com/keystone-engine/keystone.git
$ cd keystone
$ mkdir build
$ cd build
$ ../make-share.sh
$ sudo make install
$ sudo ldc