12月 242020
 

今天需要安装老的0.13版本的pyOpenSSL时出现下面错误“

OpenSSL/crypto/crl.c:6:23: error: static declaration of ‘X509_REVOKED_dup’ follows non-static declaration
static X509_REVOKED * X509_REVOKED_dup(X509_REVOKED *orig)”

 

结合网上资料可以使用下面的步骤即可完成安装:

1.#新建一个目录build

[[email protected]] mkdir build

[[email protected]] cd build

 

2. #然后下载pyOpenSSL==0.13的源码,解压后
[[email protected]] pip download pyOpenSSL==0.13
[[email protected]] tar xzf pyOpenSSL-0.13.tar.gz

 

3.#修改OpenSSL/crypto/crl.c文件
[[email protected]] cd pyOpenSSL-0.13

[[email protected]] vi OpenSSL/crypto/crl.c

找到这一行
static  X509_REVOKED * X509_REVOKED_dup(X509_REVOKED *orig) {

删除static,修改为:

X509_REVOKED * X509_REVOKED_dup(X509_REVOKED *orig) {

 

4.#然后再安装

[[email protected]] pip install –no-clean .

 

DONE!!!

Sorry, the comment form is closed at this time.