【问题标题】:How to install cryptography on ubuntu 18.04 bionic?如何在 ubuntu 18.04 仿生上安装密码学?
【发布时间】:2020-01-01 04:33:41
【问题描述】:

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

主要错误是:

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

注意,我正在使用带有ubuntu:bionic 的 docker,并安装以下项目:

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

【问题讨论】:

    标签: python docker ubuntu-18.04


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-05-10
      • 2019-06-17
      • 2020-06-26
      • 2020-01-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多