Ich habe mein Django - Projekt mit dem neuen macOS Catalina ausgeführt und lief einwandfrei.
Ich habe oh_my_zsh installiert und dann versucht, dasselbe Projekt auszuführen, das mit den folgenden Fehlern abstürzt. Ich habe oh_my_zsh deinstalliert und es erneut versucht, aber es hat nicht funktioniert.
Path: /usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 3.7.4 (3.7.4)
Code Type: X86-64 (Native)
Parent Process: Python [7526]
Responsible: Terminal [7510]
User ID: 501
Date/Time: 2019-10-07 20:59:20.675 +0530
OS Version: Mac OS X 10.15 (19A582a)
Report Version: 12
Anonymous UUID: CB7F20F6-96C0-4F63-9EC5-AFF3E0989687
Time Awake Since Boot: 3000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.Apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
/usr/lib/libcrypto.dylib
abort() called
Invalid dylib load. Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI.
Ich bin gerade auf das gleiche Problem gestoßen und fühlte mich etwas unwohl, Dinge manuell zu verknüpfen.
Ich konnte das Problem einfach lösen
brew install openssl
export DYLD_LIBRARY_PATH=/usr/local/opt/openssl/lib:$DYLD_LIBRARY_PATH
Ich habe diese Zeile gerade zu meiner .zshrc hinzugefügt.
Bearbeiten: Laut diese Frage ist die Verwendung von DYLD_FALLBACK_LIBRARY_PATH
Der Verwendung von DYLD_LIBRARY_PATH
Vorzuziehen.
Vorsichtsmaßnahme: Ich bin kein Sicherheitsexperte, und diese Lösung bringt Kryptobibliotheken durcheinander!
Ich glaube nicht, dass Ihr Problem von zsh oder oh-my-zsh herrührt. Meine beste Vermutung: Einige mit MacOS 10.15 installierte Kryptobibliotheken sind nicht mit der Installation von Homebrew python3
Kompatibel.
Hier ist, was das Problem für mich behoben hat
# Install openssl via homebrew.
# Note: According to homebrew, "openssl is keg-only, which means it was
# not symlinked into /usr/local, because Apple has deprecated use of
# OpenSSL in favor of its own TLS and crypto libraries."
brew install openssl
# Symlink those versions into /usr/local/lib, which gets Python to dynamically
# link against those instead of the version in /usr/lib/.
# Got the idea from https://forums.developer.Apple.com/thread/119429
cd /usr/local/lib
Sudo ln -s /usr/local/Cellar/openssl/1.0.2t/lib/libssl.1.0.0.dylib libssl.dylib
Sudo ln -s /usr/local/Cellar/openssl/1.0.2t/lib/libcrypto.1.0.0.dylib libcrypto.dylib
Meine Situation für den Kontext :
brew install python
pip3
Fehlgeschlagen mit SIGABRT
Kopfzeile des Systemfehlerberichts:
Process: Python [52429]
Path: /usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 3.7.4 (3.7.4)
Code Type: X86-64 (Native)
Parent Process: zsh [43309]
Responsible: iTerm2 [2316]
User ID: 501
Date/Time: 2019-10-09 09:52:18.148 -0700
OS Version: Mac OS X 10.15 (19A583)
Report Version: 12
Bridge OS Version: 4.0 (17P572)
Anonymous UUID:
Sleep/Wake UUID:
Time Awake Since Boot: 9900 seconds
Time Since Wake: 7300 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.Apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
/usr/lib/libcrypto.dylib
abort() called
Invalid dylib load. Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI.
Ich bevorzuge eine Kombination aus @bixel, @Juro Oravec & @honkaboy Antworten:
brew install openssl
cd /usr/local/lib
Sudo ln -s /usr/local/opt/openssl/lib/libssl.dylib libssl.dylib
Sudo ln -s /usr/local/opt/openssl/lib/libcrypto.dylib libcrypto.dylib
Auf diese Weise verweisen die Dylibs zumindest theoretisch beim Aktualisieren von openssl immer auf die neuesten Versionen. /usr/local/opt/openssl
ist eigentlich ein Link zu /usr/local/Cellar/openssl/Cellar/openssl/1.0.2t
(die von Brew installierte Version von openssl).
Der Grund, warum das Problem auftritt, wird tatsächlich durch Brauen erklärt:
openssl ist nur keg-fähig, was bedeutet, dass es nicht mit/usr/local verknüpft wurde, da Apple hat die Verwendung von OpenSSL zugunsten seiner eigenen TLS- und Kryptobibliotheken abgelehnt.
Der Versuch, brew link openssl
:
Warnung: Verweigerung der Verknüpfung von von macOS bereitgestellter Software: openssl Wenn Sie in Ihrem PATH-Lauf zuerst openssl benötigen: echo 'export PATH = "/ usr/local/opt/openssl/bin: $ PATH"' >> ~/.bash_profile
Damit Compiler openssl finden können, müssen Sie möglicherweise Folgendes festlegen: export LDFLAGS = "- L/usr/local/opt/openssl/lib" export CPPFLAGS = "- I/usr/local/opt/openssl/include"
Damit pkg-config openssl findet, müssen Sie möglicherweise Folgendes festlegen: export PKG_CONFIG_PATH = "/ usr/local/opt/openssl/lib/pkgconfig"
Grundsätzlich müssen Sie sie also manuell verknüpfen.
r.xuan aus diesem Apple Dev-Thread identifizierte die Schritte einer Problemumgehung für den Fehler Invalid dylib load. Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI.
durch Ersetzen des libssl.dylib
und libcrypto.dylib
Links in /usr/local/lib
mit Links zu Bibliotheken aus Homebrews Installation von openssl
.
Holen Sie sich frische Bibliotheken
1) brew update && brew upgrade && brew install openssl
2) cd /usr/local/Cellar/openssl/1.0.2t/lib
3) Sudo cp libssl.1.0.0.dylib libcrypto.1.0.0.dylib /usr/local/lib/
Sichern Sie die alten
4) cd /usr/local/lib
5) mv libssl.dylib libssl_bak.dylib
6) mv libcrypto.dylib libcrypto_bak.dylib
Neue Links erstellen
7) Sudo ln -s libssl.1.0.0.dylib libssl.dylib
8) Sudo ln -s libcrypto.1.0.0.dylib libcrypto.dylib
Es müssen einige Abhängigkeiten wie Kryptographie verwendet werden
Lösung:
cd your-site-packages-path/
vim ./asn1crypto/_int.py
finde diese Zeile; lösche es und alles ist in Ordnung
# from ._perf._big_num_ctypes import libcrypto
Hier ist mein Problem
Process: Python [85179]
Path: /usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 3.7.4 (3.7.4)
Code Type: X86-64 (Native)
Parent Process: ??? [85161]
Responsible: iTerm2 [11711]
User ID: 501
Date/Time: 2019-10-07 23:00:25.143 +0800
OS Version: Mac OS X 10.15 (19A582a)
Report Version: 12
Bridge OS Version: 3.0 (14Y906)
Anonymous UUID: 32C73ADD-1291-FA0E-DC02-48D539674325
Time Awake Since Boot: 42000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.Apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
/usr/lib/libcrypto.dylib
abort() called
Invalid dylib load. Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI.
Ich habe ähnliche Probleme mit ansible
gesehen. Der Schuldige war asn1crypto
Und das Problem war bereits behoben .
Meine Lösung bestand darin, es manuell zu entfernen und mit pip
neu zu installieren:
rm -r /usr/local/lib/python2.7/site-packages/asn1crypto*
. Dadurch konnte pip
problemlos funktionieren.pip install asn1crypto
, Das 1.2.0
Installiert hat: Found existing installation: asn1crypto 0.24.0
Uninstalling asn1crypto-0.24.0:
Successfully uninstalled asn1crypto-0.24.0
Successfully installed asn1crypto-1.2.0
[~ # ~] Hinweis [~ # ~] : Sie können überprüfen, ob asn1crypto
der Schuldige ist, indem Sie python
ausführen im ausführlichen Modus, z python -v $(which ansible)
. In meinem Fall stürzte es beim Importieren von asn1crypto
Ab:
# /usr/local/lib/python2.7/site-packages/asn1crypto/_perf/_big_num_ctypes.pyc matches /usr/local/lib/python2.7/site-packages/asn1crypto/_perf/_big_num_ctypes.py
import asn1crypto._perf._big_num_ctypes # precompiled from /usr/local/lib/python2.7/site-packages/asn1crypto/_perf/_big_num_ctypes.pyc
[1] 59247 abort python -v $(which ansible)
Verwandte: https://github.com/Homebrew/homebrew-core/issues/44996
Wenn Sie Kevlar von DevMate verwenden, aktualisieren Sie auf 4.3.1, was "den durch die Version von libcrypto.dylib verursachten Absturz von macOS Catalina behoben hat".
Um den oben genannten Antworten zu folgen, wollte ich die Datei libssl.dylib verlinken, fand aber keinen der folgenden Speicherorte:
/usr/local/Cellar/openssl/1.0.2t/lib/
Als akzeptierte Antwort von @bixel fand sich die Datei jedoch unter dem Speicherort
/usr/local/opt/openssl/lib
und es hat bei mir funktioniert.
Ich habe das gleiche Problem festgestellt, als ich ctypes.cdll
Zum Öffnen von /usr/lib/libcrypto.dylib
Mit Python 3.7
Verwendet habe. Das dylib
KANN jedoch mit Python 2.7
Geöffnet werden.
Ich habe das neueste openssl
mit brew install
Installiert, dann die Umgebungsvariablen festgelegt und Links wie oben vorgeschlagen erstellt. Es ist NICHTS Gutes passiert.
Nach einigen Stunden des Grabens fand ich eine Problemumgehungslösung.
Ich habe einige libcrypto.X.dylib
In /usr
Wie folgt gefunden:
/usr/lib/libcrypto.dylib
/usr/lib/libcrypto.0.9.7.dylib
/usr/lib/libcrypto.0.9.8.dylib
/usr/lib/libcrypto.35.dylib
/usr/lib/libcrypto.41.dylib
/usr/lib/libcrypto.42.dylib
/usr/lib/libcrypto.44.dylib
/usr/local/opt/openssl/lib/libcrypto.1.1.dylib
/usr/local/opt/openssl/lib/libcrypto.dylib
Zuerst habe ich das folgende verwendet, um das stattdessen in /usr/lib
Zu ersetzen.
os.environ['DYLD_FALLBACK_LIBRARY_PATH'] = '/usr/local/opt/openssl/lib'
Es konnte geladen werden, aber einige Apis fehlten,
AttributeError: dlsym(0x..., ECDH_OpenSSL): symbol not found
Ich habe einen Link für /usr/lib/libcrypto.X.dylib
In meinem Skriptpfad erstellt.
ln -s /usr/lib/libcrypto.X.dylib lib/libcrypto.dylib
Fügen Sie dann den Pfad zu DYLD_FALLBACK_LIBRARY_PATH
Hinzu.
os.environ['DYLD_FALLBACK_LIBRARY_PATH'] = 'lib' # It should be a absolute path
Endlich hat es funktioniert.
Versuchen:
python3 -m pip install oscrypto
Hat für mich gearbeitet!
Sieht so aus, als wäre es ein Homebrew-Problem. Ich tat brew reinstall python3
und es hat funktioniert.