解决了哇,这些家伙速度很快......基本上就是这个https://github.com/pyca/cryptography/issues/2750原来,openssl 的安全更新已发布(DROWN Attack),该更新包含意外功能导致不兼容的签名更改,所以这对我来说只是运气不好。
我需要pip install cryptography
在运行 Alpine Linux 的 Docker 容器中使用。实际上,它是另一个模块,service_identity
但问题在于cryptography
模块,这是一个依赖项。
我有以下 Dockerfile
FROM alpine:3.3
RUN apk --update add build-base libffi-dev openssl-dev python-dev py-pip
RUN pip install cryptography
失败并出现以下错误
generating cffi module 'build/temp.linux-x86_64-2.7/_openssl.c'
building '_openssl' extension
creating build/temp.linux-x86_64-2.7/build
creating build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7
gcc -fno-strict-aliasing -Os -fomit-frame-pointer -DNDEBUG -Os -fomit-frame-pointer -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
build/temp.linux-x86_64-2.7/_openssl.c:726:6: error: conflicting types for 'BIO_new_mem_buf'
BIO *BIO_new_mem_buf(void *, int);
^
In file included from /usr/include/openssl/asn1.h:65:0,
from build/temp.linux-x86_64-2.7/_openssl.c:434:
/usr/include/openssl/bio.h:692:6: note: previous declaration of 'BIO_new_mem_buf' was here
BIO *BIO_new_mem_buf(const void *buf, int len);
^
error: command 'gcc' failed with exit status 1
openssl 1.0.2g 于 2016 年 3 月 1 日(昨天)发布,alpine 软件包已经更新到该版本。会不会和这个有关?
我该如何解决这个问题?也许我可以设置一些环境变量?
更新我一直在检查 GitHub 存储库中的 openssl,实际上BIO *BIO_new_mem_buf(void *buf, int len)
在1.0.2f 到 1.0.2g 过渡期间openssl/bio.h
更改为(在https://github.com/openssl/openssl/compare/BIO *BIO_new_mem_buf(const void *buf, int len)
中搜索“BIO_new_mem_buf”)OpenSSL_1_0_2f...OpenSSL_1_0_2g)。我不知道这openssl/asn1.h
是从哪里来的,它正在导入一个过时的版本openssl/bio.h
,因为它看起来不像 openssl repo 中的那个。有任何想法吗?
好的,我看到有些人已经在研究这个: https ://github.com/pyca/cryptography/issues/2750