【问题标题】:Linking OpenSSL 1.1.0e installed manually to python2.7 [duplicate]将手动安装的 OpenSSL 1.1.0e 链接到 python2.7 [重复]
【发布时间】:2017-09-29 03:14:04
【问题描述】:

我正在尝试更新我的 Python SSL,但我无法做到。

当我在终端检查 openssl 版本时,我得到:

OpenSSL 1.1.0e 2017 年 2 月 16 日

当我检查 python ssl 库时:

python -c "import ssl; print ssl.OPENSSL_VERSION"

我明白了:

OpenSSL 1.0.2k  26 Jan 2017

我已经通过自制软件安装了 Python,其中:

rew install python --with-brewed-openssl

这是我正在运行的版本:

Python 2.7.13

我手动安装了 OpenSSL 1.1.0e,如何链接到 python?

【问题讨论】:

标签: python macos python-2.7 ssl openssl


【解决方案1】:

OpenSSL 1.0.2 和 OpenSSL 1.1.0 在 API 级别不兼容。这意味着您不能简单地将 Python 重新链接到新的 libssl 和 libcrypto。相反,您需要使用新的 libssl 和 libcrypto 重建 Python,如 How do I compile Python 3.4 with custom OpenSSL?Building Python with SSL support in non-standard location 中所述。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-02
    • 2021-05-16
    • 1970-01-01
    相关资源
    最近更新 更多