<分区>
<分区>
我正在尝试更新我的 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?
最佳答案
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 .
关于python - 将手动安装的 OpenSSL 1.1.0e 链接到 python2.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43723615/