macos 在 OSX 上更新 OpenSSL 版本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9275786/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 08:53:05  来源:igfitidea点击:

Updating OpenSSL version on OSX

macosopensslosx-lion

提问by Chris

Currently on OSX 10.7 Lion openssl 0.9.8r is installed. This build is from Feb 2011 and I want to update it to the newest version. I can't use the autoupdate because I need the enable-cms option so I built it from the source, run ./Configure darwin64-x86_64-ccand ./config enable-cms --openssldir=~/usr/local/ssl. Then I made "make" and "make install" without any errors but there is still the old version installed.

目前在 OSX 10.7 Lion openssl 0.9.8r 上已安装。此版本来自 2011 年 2 月,我想将其更新到最新版本。我无法使用自动更新,因为我需要 enable-cms 选项,所以我从源代码、运行./Configure darwin64-x86_64-cc./config enable-cms --openssldir=~/usr/local/ssl. 然后我做了“make”和“make install”,没有任何错误,但仍然安装了旧版本。

> openssl version
OpenSSL 0.9.8r 8 Feb 2011

What am I doing wrong? Maybe it's the folder? I only guessed that the sslfolder in /usr/local/must be the default open ssl installation directory from Mac OSX?

我究竟做错了什么?也许是文件夹?我只是猜测ssl文件夹中的文件夹/usr/local/必须是Mac OSX默认打开的ssl安装目录?

采纳答案by Chris

Okay, I found a solution.

好的,我找到了解决方案。

Before starting:

在开始之前:

  1. download sources
  2. unpack sources
  3. go into the unpacked source directory
  1. 下载源
  2. 解压源
  3. 进入解压后的源码目录

The prefixhas to be set on the /usr/folder.

前缀必须在设定/usr/的文件夹。

sudo ./configure --prefix=/usr/ darwin64-x86_64-cc enable-cms
sudo make
sudo make install

Note: To perform just a normal update you can drop the enable-cmsoption.

注意:要仅执行正常更新,您可以删除该enable-cms选项。