Erstellen von Python und OpenSSL aus dem Quellcode, aber das SSL-Modul schlägt fehlPython

Python-Programme
Guest
 Erstellen von Python und OpenSSL aus dem Quellcode, aber das SSL-Modul schlägt fehl

Post by Guest »

Ich versuche, Python und OpenSSL aus dem Quellcode in einem Container zu erstellen. Beide scheinen korrekt zu erstellen, aber Python erstellt das _ssl-Modul nicht erfolgreich.

Ich habe online ein paar Anleitungen gefunden, die sagen, man solle die Kommentare entfernen und Zeilen aus Python-

Code: Select all

3.X.X/Modules/Setup
und fügen Sie das Flag --openssldir=/usr/local/ssl zum Schritt ./configure für OpenSSL hinzu. Ich mache das in meiner Docker-Datei. Dies hatte zur Folge, dass ich während der ./configure-Ausgabe für Python die folgende Zeile sehe.

Code: Select all

checking for X509_VERIFY_PARAM_set1_host in libssl... yes
Dennoch erhalte ich die folgenden Fehlermeldungen:

Code: Select all

[91m*** WARNING: renaming "_ssl" since importing it failed: /usr/lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by build/lib.linux-x86_64-3.8/_ssl.cpython-38-x86_64-linux-gnu.so)
[0m[91m*** WARNING: renaming "_hashlib" since importing it failed: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by build/lib.linux-x86_64-3.8/_hashlib.cpython-38-x86_64-linux-gnu.so)
[0m
Python build finished successfully!
...

Code: Select all

Following modules built successfully but were removed because they could not be imported:
_hashlib              _ssl

Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381
Wenn ./configure X509 findet..., warum erhalte ich dann immer noch die Hashlib- und SSL-Fehler?

Die vollständige Docker-Datei, FWIW:

Code: Select all

FROM jenkins/jenkins:lts
USER root
RUN apt-get update && apt-get install -y apt-utils gcc make zlib1g-dev \
build-essential libffi-dev checkinstall libsqlite3-dev
RUN wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz && \
tar xzf openssl-1.1.1d.tar.gz && \
cd openssl-1.1.1d && \
./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)' --prefix=/usr/local/ssl --openssldir=/usr/local/ssl && \
make && \
make test && \
make install
RUN wget -q https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz && \
tar -xzf Python-3.8.2.tgz && \
cd Python-3.8.2 && \
./configure && \
make && \
make install
USER jenkins

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post