如何安装最新版本的openssl Mac OS X El Capitan [英] How to install latest version of openssl Mac OS X El Capitan

查看:284
本文介绍了如何安装最新版本的openssl Mac OS X El Capitan的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用brew install openssl下载并安装openssl v1.0.2f,但是回来时说:

I have used brew install openssl to download and install openssl v1.0.2f, however, it comes back saying:

A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include

当我做openssl version -a时,它总是给我:

And when I do openssl version -a it always gives me:

OpenSSL 0.9.8zg 14 July 2015
built on: Jul 31 2015
platform: darwin64-x86_64-llvm
options:  bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) blowfish(idx) 
compiler: -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O3 -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DMD32_REG_T=int -DOPENSSL_NO_IDEA -DOPENSSL_PIC -DOPENSSL_THREADS -DZLIB -mmacosx-version-min=10.6
OPENSSLDIR: "/System/Library/OpenSSL"

如何用新版本替换旧版本?我已经搜索了很多有关如何执行此操作的方法,但是在线解决方案似乎对我不起作用...

How can I replace the old version with the new one? I've searched a lot on how to do this, but the solutions online don't seem to work for me...

推荐答案

执行以下命令:

brew update
brew install openssl
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile

您将安装最新版本的openssl,并可以从cli(命令行/终端)进行访问.由于第三个命令会将导出路径添加到.bash_profile,因此在系统重新启动时可以访问新安装的openssl版本.

You will have the latest version of openssl installed and accessible from cli (command line/terminal). Since the third command will add export path to .bash_profile, the newly installed version of openssl will be accessible across system restarts.

这篇关于如何安装最新版本的openssl Mac OS X El Capitan的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆