相关疑难解决方法(0)

不能在Docker Alpine Linux 3.3中使用OpenSSL 1.0.2g和Python 2.7"pip安装加密"

解决了哇,这些家伙很快......基本上就是这个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
Run Code Online (Sandbox Code Playgroud)

失败,出现以下错误

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' …
Run Code Online (Sandbox Code Playgroud)

python linux openssl dockerfile alpine-linux

11
推荐指数
2
解决办法
9048
查看次数

标签 统计

alpine-linux ×1

dockerfile ×1

linux ×1

openssl ×1

python ×1