简体   繁体   English

'/usr/bin/gcc' 在 Python:3.7-alpine 上安装加密 package python 时失败,退出代码为 1

[英]'/usr/bin/gcc' failed with exit code 1 while installing cryptography package python on Python:3.7-alpine

Error stack trace错误堆栈跟踪

creating build/temp.linux-aarch64-cpython-37/build
#9 13.81       creating build/temp.linux-aarch64-cpython-37/build/temp.linux-aarch64-cpython-37
#9 13.81       gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/local/include/python3.7m -c build/temp.linux-aarch64-cpython-37/_openssl.c -o build/temp.linux-aarch64-cpython-37/build/temp.linux-aarch64-cpython-37/_openssl.o -Wconversion -Wno-error=sign-conversion
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:2183:7: error: 'EVP_PKEY_CTX_set_rsa_oaep_md' redeclared as different kind of symbol
#9 13.81        2183 | int (*EVP_PKEY_CTX_set_rsa_oaep_md)(EVP_PKEY_CTX *, EVP_MD *) = NULL;
#9 13.81             |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       In file included from /usr/include/openssl/x509.h:36,
#9 13.81                        from /usr/include/openssl/ct.h:29,
#9 13.81                        from build/temp.linux-aarch64-cpython-37/_openssl.c:636:
#9 13.81       /usr/include/openssl/rsa.h:158:5: note: previous declaration of 'EVP_PKEY_CTX_set_rsa_oaep_md' with type 'int(EVP_PKEY_CTX *, const EVP_MD *)' {aka 'int(struct evp_pkey_ctx_st *, const struct evp_md_st *)'}
#9 13.81         158 | int EVP_PKEY_CTX_set_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
#9 13.81             |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:2190:7: error: 'EVP_PKEY_CTX_set0_rsa_oaep_label' redeclared as different kind of symbol
#9 13.81        2190 | int (*EVP_PKEY_CTX_set0_rsa_oaep_label)(EVP_PKEY_CTX *, unsigned char *,
#9 13.81             |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       /usr/include/openssl/rsa.h:164:5: note: previous declaration of 'EVP_PKEY_CTX_set0_rsa_oaep_label' with type 'int(EVP_PKEY_CTX *, void *, int)' {aka 'int(struct evp_pkey_ctx_st *, void *, int)'}
#9 13.81         164 | int EVP_PKEY_CTX_set0_rsa_oaep_label(EVP_PKEY_CTX *ctx, void *label, int llen);
#9 13.81             |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function 'Cryptography_pem_password_cb':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:2943:37: warning: conversion to 'size_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion]
#9 13.81        2943 |         memcpy(buf, st->password, st->length);
#9 13.81             |                                   ~~^~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_const_CRYPTO_MEM_CHECK_DISABLE':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:7085:12: error: 'CRYPTO_MEM_CHECK_DISABLE' undeclared (first use in this function); did you mean '_cffi_const_CRYPTO_MEM_CHECK_DISABLE'?
#9 13.81        7085 |   int n = (CRYPTO_MEM_CHECK_DISABLE) <= 0;
#9 13.81             |            ^~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81             |            _cffi_const_CRYPTO_MEM_CHECK_DISABLE
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:7085:12: note: each undeclared identifier is reported only once for each function it appears in
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_const_CRYPTO_MEM_CHECK_ENABLE':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:7092:12: error: 'CRYPTO_MEM_CHECK_ENABLE' undeclared (first use in this function); did you mean '_cffi_const_CRYPTO_MEM_CHECK_ENABLE'?
#9 13.81        7092 |   int n = (CRYPTO_MEM_CHECK_ENABLE) <= 0;
#9 13.81             |            ^~~~~~~~~~~~~~~~~~~~~~~
#9 13.81             |            _cffi_const_CRYPTO_MEM_CHECK_ENABLE
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_const_CRYPTO_MEM_CHECK_OFF':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:7099:12: error: 'CRYPTO_MEM_CHECK_OFF' undeclared (first use in this function)
#9 13.81        7099 |   int n = (CRYPTO_MEM_CHECK_OFF) <= 0;
#9 13.81             |            ^~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_const_CRYPTO_MEM_CHECK_ON':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:7106:12: error: 'CRYPTO_MEM_CHECK_ON' undeclared (first use in this function)
#9 13.81        7106 |   int n = (CRYPTO_MEM_CHECK_ON) <= 0;
#9 13.81             |            ^~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_const_EVP_R_KEYGEN_FAILURE':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:7886:12: error: 'EVP_R_KEYGEN_FAILURE' undeclared (first use in this function)
#9 13.81        7886 |   int n = (EVP_R_KEYGEN_FAILURE) <= 0;
#9 13.81             |            ^~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_BIO_s_datagram':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:13688:10: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#9 13.81       13688 |   return BIO_s_datagram();
#9 13.81             |          ^~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_BIO_s_datagram':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:13699:12: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#9 13.81       13699 |   { result = BIO_s_datagram(); }
#9 13.81             |            ^
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_BIO_s_mem':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:13714:10: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#9 13.81       13714 |   return BIO_s_mem();
#9 13.81             |          ^~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_BIO_s_mem':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:13725:12: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#9 13.81       13725 |   { result = BIO_s_mem(); }
#9 13.81             |            ^
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_CRYPTO_mem_ctrl':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:16642:10: warning: implicit declaration of function 'CRYPTO_mem_ctrl'; did you mean 'CRYPTO_memcmp'? [-Wimplicit-function-declaration]
#9 13.81       16642 |   return CRYPTO_mem_ctrl(x0);
#9 13.81             |          ^~~~~~~~~~~~~~~
#9 13.81             |          CRYPTO_memcmp
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_ERR_GET_FUNC':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:25626:10: warning: implicit declaration of function 'ERR_GET_FUNC'; did you mean 'ERR_GET_LIB'? [-Wimplicit-function-declaration]
#9 13.81       25626 |   return ERR_GET_FUNC(x0);
#9 13.81             |          ^~~~~~~~~~~~
#9 13.81             |          ERR_GET_LIB
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_FIPS_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:31224:10: warning: implicit declaration of function 'FIPS_mode' [-Wimplicit-function-declaration]
#9 13.81       31224 |   return FIPS_mode();
#9 13.81             |          ^~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_FIPS_mode_set':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:31250:10: warning: implicit declaration of function 'FIPS_mode_set' [-Wimplicit-function-declaration]
#9 13.81       31250 |   return FIPS_mode_set(x0);
#9 13.81             |          ^~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_OCSP_resp_get0_certs':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:34338:10: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#9 13.81       34338 |   return OCSP_resp_get0_certs(x0);
#9 13.81             |          ^~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_OCSP_resp_get0_certs':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:34361:12: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#9 13.81       34361 |   { result = OCSP_resp_get0_certs(x0); }
#9 13.81             |            ^
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_add_extra_chain_cert':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:40821:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       40821 |   return SSL_CTX_add_extra_chain_cert(x0, x1);
#9 13.81             |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_add_extra_chain_cert':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:40859:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       40859 |   { result = SSL_CTX_add_extra_chain_cert(x0, x1); }
#9 13.81             |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_get_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:41289:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       41289 |   return SSL_CTX_get_mode(x0);
#9 13.81             |          ^~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_get_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:41312:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       41312 |   { result = SSL_CTX_get_mode(x0); }
#9 13.81             |              ^~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_get_session_cache_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:41403:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       41403 |   return SSL_CTX_get_session_cache_mode(x0);
#9 13.81             |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_get_session_cache_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:41426:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       41426 |   { result = SSL_CTX_get_session_cache_mode(x0); }
#9 13.81             |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_set_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:43067:10: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81       43067 |   return SSL_CTX_set_mode(x0, x1);
#9 13.81             |          ^~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:43067:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_set_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:43100:14: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81       43100 |   { result = SSL_CTX_set_mode(x0, x1); }
#9 13.81             |              ^~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:43100:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       In file included from build/temp.linux-aarch64-cpython-37/_openssl.c:798:
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_set_session_cache_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:43463:45: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81       43463 |   return SSL_CTX_set_session_cache_mode(x0, x1);
#9 13.81             |                                             ^~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:43463:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       43463 |   return SSL_CTX_set_session_cache_mode(x0, x1);
#9 13.81             |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_set_session_cache_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:43496:49: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81       43496 |   { result = SSL_CTX_set_session_cache_mode(x0, x1); }
#9 13.81             |                                                 ^~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:43496:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       43496 |   { result = SSL_CTX_set_session_cache_mode(x0, x1); }
#9 13.81             |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_set_tmp_dh':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:43869:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       43869 |   return SSL_CTX_set_tmp_dh(x0, x1);
#9 13.81             |          ^~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_set_tmp_dh':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:43907:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       43907 |   { result = SSL_CTX_set_tmp_dh(x0, x1); }
#9 13.81             |              ^~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_set_tmp_ecdh':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:43922:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       43922 |   return SSL_CTX_set_tmp_ecdh(x0, x1);
#9 13.81             |          ^~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_set_tmp_ecdh':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:43960:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       43960 |   { result = SSL_CTX_set_tmp_ecdh(x0, x1); }
#9 13.81             |              ^~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_SESSION_get_ticket_lifetime_hint':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:44675:10: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81       44675 |   return SSL_SESSION_get_ticket_lifetime_hint(x0);
#9 13.81             |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_SESSION_get_ticket_lifetime_hint':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:44698:14: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81       44698 |   { result = SSL_SESSION_get_ticket_lifetime_hint(x0); }
#9 13.81             |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_get_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:46091:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       46091 |   return SSL_get_mode(x0);
#9 13.81             |          ^~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_get_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:46114:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       46114 |   { result = SSL_get_mode(x0); }
#9 13.81             |              ^~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_set_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:47950:10: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81       47950 |   return SSL_set_mode(x0, x1);
#9 13.81             |          ^~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:47950:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_set_mode':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:47983:14: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81       47983 |   { result = SSL_set_mode(x0, x1); }
#9 13.81             |              ^~~~~~~~~~~~
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:47983:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_EVP_PKEY_CTX_set_rsa_oaep_md':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:28273:1: warning: control reaches end of non-void function [-Wreturn-type]
#9 13.81       28273 | }
#9 13.81             | ^
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_EVP_PKEY_CTX_set0_rsa_oaep_label':
#9 13.81       build/temp.linux-aarch64-cpython-37/_openssl.c:28161:1: warning: control reaches end of non-void function [-Wreturn-type]
#9 13.81       28161 | }
#9 13.81             | ^
#9 13.81       error: command '/usr/bin/gcc' failed with exit code 1
#9 13.81       [end of output]
#9 13.81
#9 13.81   note: This error originates from a subprocess, and is likely not a problem with pip.
#9 13.81   ERROR: Failed building wheel for cryptography
#9 13.81   Building wheel for cffi (setup.py): started
#9 17.02   Building wheel for cffi (setup.py): finished with status 'done'
#9 17.02   Created wheel for cffi: filename=cffi-1.15.1-cp37-cp37m-linux_aarch64.whl size=194157 sha256=4d9b4b781f90c9a48ba70d4b20376e205e3de1ad40ffc80a65e7b1760e68a019
#9 17.02   Stored in directory: /tmp/pip-ephem-wheel-cache-gz78zwhy/wheels/a1/3b/8e/0d937b639299138f2af58408c94c78bb6c18839c57d0ad8671
#9 17.02 Successfully built cffi
#9 17.02 Failed to build cryptography
#9 17.02 ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects

Dockerfile Dockerfile

` `

FROM python:3.7-alpine

RUN apk add libpq libxml2-dev libxslt-dev
RUN apk add --no-cache libffi-dev postgresql-dev gcc python3-dev musl-dev gfortran build-base wget freetype-dev libpng-dev openblas-dev mariadb-connector-c-dev \
# && ln -s /usr/include/locale.h /usr/include/xlocale.h



COPY requirements.txt requirements.txt
RUN /usr/local/bin/python3 -m pip install --no-cache --upgrade pip \
 &&  pip3 install --no-cache -r requirements.txt

COPY /crawlers /crawlers
COPY /config /config
COPY /src ./src
Copy credentials.storage credentials.storage
CMD python -m src.app --service import_prices --config ./src/config/docker_config.yml --store 1 --channel medizinfuchs --all True

` `

I would like to install cryptography==2.4.2 .我想安装cryptography==2.4.2

Things I've done already:我已经做过的事情:

  • Tried to install later versions of cryptography (didn't work)试图安装更高版本的密码学(没有用)
  • Tried fixing the version of pip when it worked (still didn't work)尝试修复 pip 的版本(仍然无效)
  • added dependencies based here (didn't work)添加基于此处的依赖项(无效)
  • Tried using other versions of Python (3.8)尝试使用其他版本的 Python (3.8)

I'm just torn on why this suddenly broke.我只是对为什么这突然破裂感到困惑。

Solution解决方案

use crytography==3.4使用crytography==3.4

this would require to add the following packages $ sudo apk add gcc musl-dev python3-dev libffi-dev openssl-dev cargo from cryptography documentation这将需要添加以下软件包$ sudo apk add gcc musl-dev python3-dev libffi-dev openssl-dev cargo from cryptography documentation

My final Dockerfile looked like this:我的最终 Dockerfile 看起来像这样:

FROM python:3.7-alpine

RUN apk add libpq libxml2-dev libxslt-dev
RUN apk add --no-cache libffi-dev postgresql-dev gcc g++ python3-dev musl-dev linux-headers make libc-dev openssl-dev cargo gfortran build-base wget freetype-dev libpng-dev openblas-dev mariadb-connector-c-dev \
 && ln -s /usr/include/locale.h /usr/include/xlocale.h


COPY requirements.txt requirements.txt
RUN /usr/local/bin/python3 -m pip install --no-cache --upgrade pip \
 &&  pip3 install -r requirements.txt

COPY /crawlers /crawlers
COPY /config /config
COPY /src ./src
Copy credentials.storage credentials.storage
CMD python -m src.app --service import_prices --config ./src/config/docker_config.yml --store 1 --channel medizinfuchs --all True

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 pip3 install pgzero --- 导致命令“/usr/bin/gcc”失败,退出代码为 1(Python 3.9;macOS 10.15.7) - pip3 install pgzero --- leads to command '/usr/bin/gcc' failed with exit code 1 (Python 3.9; macOS 10.15.7) 无法在 Python-3.7-alpine docker 容器上安装 gcc - Failed to install gcc on Python-3.7-alpine docker container 错误:安装python手套时,命令“ gcc”失败,退出状态为1 - error: command 'gcc' failed with exit status 1 while installing python glove 在 python 3.7 中安装“hmac”package 时出错 - error installing while “hmac” package in python 3.7 MacOS /usr/bin/python3 存根的退出代码是什么? - What is the exit code of the MacOS /usr/bin/python3 stub? 安装python加密技术centos 7 64时出现gcc错误 - gcc error installing python cryptography centos 7 64 为什么/usr/local/bin 中有python3 和python3.7? - why is there python3 and also python3.7 in /usr/local/bin? CompileError:安装pystan时,命令&#39;C:\\\\ MinGW \\\\ bin \\\\ gcc.exe&#39;失败,退出状态为1 - CompileError : command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1 while installing pystan /usr/local/bin/pip:错误的解释器:/usr/local/opt/python/bin/python3.7 - /usr/local/bin/pip: bad interpreter: /usr/local/opt/python/bin/python3.7 在Mac中为Python 3.7安装Tensorflow时出现的问题 - Issues while installing tensorflow for Python 3.7 in Mac
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM