简体   繁体   English

在Mac(Yosemite)上将OpenSSL升级到1.0.2的问题

[英]Issues upgrading OpenSSL to 1.0.2 on Mac(Yosemite)

I'm running python 2.7.11 and am trying to upgrade openSSL from version 0.9.8 to 1.0.2 我正在运行python 2.7.11并且正在尝试将openSSL从0.9.8升级到1.0.2

I ran the command brew install openssl and things seemed to install correctly. 我运行命令brew install openssl ,似乎安装正确。 However, openSSL has not been updated 但是,openSSL尚未更新

$ openssl version
    OpenSSL 0.9.8zg 14 July 2015

$ brew install openssl
    Warning: openssl-1.0.2h_1 already installed

$ brew link --force openssl
    Warning: Already linked: /usr/local/Cellar/openssl/1.0.2h_1
    To relink: brew unlink openssl && brew link openssl

It looks like things have been installed but I'm not familiar with what steps to take to get things squared away. 看起来事情已经安装但我不熟悉采取什么措施让事情平息。

EDIT I updated my path as per this post so that /usr/local/bin came before /usr/bin and I get the following: 编辑我根据这篇文章更新了我的路径,以便/ usr / local / bin/ usr / bin之前出现,我得到以下内容:

$ openssl version
    OpenSSL 1.0.2h  3 May 2016

However, in python it's running the old version 但是,在python中它正在运行旧版本

$ python -c "import ssl; print ssl.OPENSSL_VERSION"
   OpenSSL 0.9.8zg 14 July 2015

SOLVED NO HACKS, none of the above worked for me. 解决没有任何问题,以上都没有为我工作。 I ended up taking a simpler and uncomplicated approach.... 我最终采取了一种更简单,更简单的方法......

  1. Install python 2.7.13 from the official site, it actually installs as the default python, upgrading the old python system wide. 从官方站点安装python 2.7.13,它实际上安装为默认的python,升级旧的python系统。

https://www.python.org/downloads/mac-osx/ https://www.python.org/downloads/mac-osx/

  1. Upgrade openssl after the python install, effect is system wide. python安装后升级openssl,效果是系统范围的。

sudo pip install --upgrade pyOpenSSL sudo pip install --upgrade pyOpenSSL

  1. You will have to re-install all your python modules ( because you replaced python ), I strongly recommend using pip. 你将不得不重新安装所有的python模块(因为你替换了python),我强烈建议使用pip。 After a few minutes of pip installs my default OSX python was upgraded, I had openssl upgraded, and I had all my modules ( including django running ). 在几分钟的pip安装后,我的默认OSX python升级了,我有openssl升级了,我有我所有的模块(包括django运行)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM