Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the default LibreSSL on Mac to the one installed by homebrew

I checked the version of LibreSSL on my mac, it's not the latest one.

$ openssl version
LibreSSL 2.6.5

And I installed a more recent version by homebrew

homebrew install libressl

The one installed by homebrew is 2.8.3. But after I installed the new one and typed in the terminal openssl version, it still showed LibreSSL 2.6.5, which means the new one had not been set as the default.

I know that homebrew has a different installation path. But I don't know how to set the path as the default path for the LibreSSL. How to set the latest version of LibreSSL as the default one in Mac? Can anyone give me some suggestions?

like image 913
wh41e Avatar asked Mar 08 '19 04:03

wh41e


People also ask

Where is Openssl path on Mac?

pem files in /usr/local/etc/[email protected]/certs and run /usr/local/opt/[email protected]/bin/c_rehash .


1 Answers

If you want the Homebrew version of LibreSSL as the default, you have to put it first in the PATH environment variable. If you type:

brew info libressl

You will obtain the command needed to do that:

If you need to have libressl first in your PATH run:
  echo 'export PATH="/usr/local/opt/libressl/bin:$PATH"' >> ~/.bash_profile
like image 183
Ortomala Lokni Avatar answered Sep 17 '22 17:09

Ortomala Lokni