【发布时间】:2019-06-07 01:13:12
【问题描述】:
尝试在 Dockerfile 中安装 m2crypto:
FROM python:3.7
RUN pip install m2crypto
我收到以下错误输出(截断):
Step 7/8 : RUN pip install m2crypto
---> Running in 1204096f1488
Collecting m2crypto
Downloading https://files.pythonhosted.org/packages/23/93/1c1a887f956ec38d691af110d38059e234fc941019e0c074a66a10846813/M2Crypto-0.34.0.tar.gz (1.1MB)
Building wheels for collected packages: m2crypto
Building wheel for m2crypto (setup.py): started
Building wheel for m2crypto (setup.py): finished with status 'error'
ERROR: Complete output from command /usr/local/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-ptf_nqd5/m2crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-w9seu9sh --python-tag cp37:
ERROR: running bdist_wheel
...
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.7m -I/tmp/pip-install-ptf_nqd5/m2crypto/SWIG -c SWIG/_m2crypto_wrap.c -o build/temp.linux-x86_64-3.7/SWIG/_m2crypto_wrap.o -Wno-deprecated-declarations -DTHREADING
SWIG/_m2crypto_wrap.c: In function ‘_wrap__STACK_num_set’:
SWIG/_m2crypto_wrap.c:9506:19: error: dereferencing pointer to incomplete type ‘struct stack_st’
if (arg1) (arg1)->num = arg2;
^~
... lots more errors ...
ERROR: Command "/usr/local/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-ptf_nqd5/m2crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-xq22_pd8/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-ptf_nqd5/m2crypto/
https://pastebin.com/3bmdGvdx 的完整输出。
我做错了吗?
【问题讨论】:
-
我不做 Docker,但gitlab.com/mcepl/m2crypto/blob/master/.gitlab-ci.yml 可以用作各种 Linux 发行版的非常好的(并且经过测试!)指南。