Python 在 MacOS 10.15 Beta (19A582a) 上与“/usr/lib/libcrypto.dylib”崩溃

新手上路,请多包涵

我使用新的 macOS Catalina 运行我的 Django 项目并且运行良好。

我安装了 oh_my_zsh 然后我尝试运行它正在崩溃并出现以下错误的同一个项目。我卸载了 oh_my_zsh 并再次尝试,但它没有用。

 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.

原文由 Faisal Manzer 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 579
2 个回答

我刚遇到同样的问题,手动链接周围的东西感觉有点不舒服。

我能够通过简单地解决问题

  1. 通过自制软件安装 openssl:
    brew install openssl

  1. 通过 DYLD_LIBRARY_PATH 从 openssl 指向动态库:
    export DYLD_LIBRARY_PATH=/usr/local/opt/openssl/lib:$DYLD_LIBRARY_PATH

我刚刚将该行添加到我的 .zshrc 中。

编辑:根据 这个问题,使用 DYLD_FALLBACK_LIBRARY_PATH 可能优于 DYLD_LIBRARY_PATH

编辑 2:如以下评论中所述, 可能应该是公认的答案。只需重新安装 cryptography 包。

原文由 bixel 发布,翻译遵循 CC BY-SA 4.0 许可协议

对我来说,重新安装 Python 的加密包就足够了。

 pip uninstall cryptography
pip install cryptography

原文由 Tony Stark 发布,翻译遵循 CC BY-SA 4.0 许可协议

推荐问题