CentOS解决pip 安装M2Crypto失败
2016-01-13 21:03
1096 查看
pip install M2Crypto报错信息:
swig -python -I/usr/local/include/python2.7 -I/usr/include -includeall -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i /usr/include/openssl/opensslconf.h:31: Error: CPP #error ""This openssl-devel package does not work your architecture?"". Use the -cpperraswarn option to continue swig processing. error: command 'swig' failed with exit status 1 ---------------------------------------- Command "/usr/local/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-_WW9OZ/M2Crypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --r或者报错:
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c swig -python -I/usr/include/python2.6 -I/usr/include -includeall -modern -builtin -outdir build/lib.linux-i686-2.6/M2Crypto -D__i386__ -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i swig error : Unrecognized option -builtin Use 'swig -help' for available options. error: command 'swig' failed with exit status 1以上都是swig的报错,原因是swig的版本过低导致的。
查看swig版本1.3.已经比较老旧了,swig -python -help 也未找到相关options:
[root@localhost ~]# rpm -qa | grep swig swig-1.3.40-6.el6.x86_64解决办法有两个:
升级swig版本
wget -O swig-3.0.7.tar.gz http://prdownloads.sourceforge.net/swig/swig-3.0.7.tar.gz tar zxf swig-3.0.7.tar.gz cd swig-3.0.7 ./configure --prefix=/usr make && make install
2.手动安装M2Crypto
[root@localhost ~]#wget [root@localhost ~]#unzip master.zip [root@localhost ~]#cd M2Crypto-master [root@localhost ~]#python setup.py installsuccess!
相关文章推荐
- Ruby中使用SWIG编写ruby扩展模块实例
- 用C#封装Maya SDK的苦逼经历
- Python 的性能测试及用C扩展Python的基本例子
- 使用Swig封装的python对象
- linux SWIG C++转换为JAVA
- windows下用swig实现python调用C\C++的方法
- CentOS安装swig2.0.9
- 使用SWIG将CRF++封装成JNI接口
- Python使用C语言生成的库
- c++扩展python
- Swig之cpp完整python扩展疑难对策
- 使用swig工具为go语言生成调用C、C++代码例子
- swig director内存管理
- fis系列-基于fis3前后端工程解决方案weg
- swig java的最佳实践
- 使用swig包装C或C++源代码在windows下用命令行编译并用distutils打包供python使用
- c#利用SWIG调用c++dll学习总结
- SWIG学习入门(一)
- Android Studio JNI学习之(3)-使用SWIG自动生成Jni代码
- Mac Swig 3.0.12 安装