如何在ubuntu 18.04仿生上安装加密技术?

时间:2019-08-28 01:46:24

标签: python docker ubuntu-18.04

尝试安装python库密码时,我不断收到gcc错误。

主要错误是:

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

请注意,我将docker与ubuntu:bionic配合使用,并安装了以下项目:

ENV DEBIAN_FRONTEND=noninteractive 
RUN apt-get update && apt-get install -y \
    build-essential \
    python3 \
    python3-pip \
    python3-dev \
    git \
    libffi-dev \
    libssl-dev

这是更长的日志输出:

    At top level:
    build/temp.linux-x86_64-3.6/_openssl.c:3555:13: warning: '_ssl_thread_locking_function' defined but not used [-Wunused-function]
     static void _ssl_thread_locking_function(int mode, int n, const char *file,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
  Can't rollback cryptography, nothing uninstalled.
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6z_lweq8/cryptography/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-3303ra3b-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-6z_lweq8/cryptography/
The command '/bin/sh -c pip3 install --no-cache-dir -r requirements.txt' returned a non-zero code: 1

1 个答案:

答案 0 :(得分:1)

感谢How to install cryptography on ubuntu?中@pobe的评论,我意识到我需要安装libssl1.0了!作为一个单独的问题发布,因为真的需要很长时间才能找到该答案。