linux python m2crypto,在CentOS上,安装 M2Crypto

按照Brian的指令,并确保你已安装 openssl-devel. 如果遇到错误如下:./fedora_setup.sh build

running build

running build_py

running build_ext

building 'M2Crypto.__m2crypto' extension

swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c

swig -python -I/usr/include/python2.6 -I/usr/include -includeall -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i

SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf-i686.h'

SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf-i686.h'

error: command 'swig' failed with exit status 1

你正在运行i386操作系统的64位硬件上。 arch =´uname -m´将产生 i686. 是解决此问题最简单的方法是创建一个符号链接。sudo ln -s /usr/include/openssl/opensslconf-i386.h /usr/include/openssl/opensslconf-i686.h

或如果遇到错误如下:./fedora_setup.sh build

running build

running build_py

running build_ext

SWIG/_m2crypto_wrap.c:27555: error: 'Swig_var__evp_err_set' undeclared (first use in this function)

SWIG/_m2crypto_wrap.c:27564: error: 'Swig_var__dh_err_get' undeclared (first use in this function)

SWIG/_m2crypto_wrap.c:27564: error: 'Swig_var__dh_err_set' undeclared (first use in this function)

SWIG/_m2crypto_wrap.c:27576: error: 'Swig_var__rsa_err_get' undeclared (first use in this function)

...

有些头文件找不到,只需执行以下命令,然后重试:sudo yum install python-devel

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值