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

12,951

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
Share:
12,951

Related videos on Youtube

wh41e
Author by

wh41e

Updated on June 04, 2022

Comments

  • wh41e
    wh41e almost 2 years

    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?