I’m on macOS Big Sur. I installed OpenSSL via Homebrew like this:
$ brew install openssl
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from 40a7a0119 to f50b87031.
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 24 formulae.
==> Updated Casks
Updated 19 casks.
Warning: [email protected] 1.1.1l is already installed and up-to-date.
To reinstall 1.1.1l, run: brew reinstall [email protected]DIG139:cfs-web davea$ brew reinstall openssl
==> Downloading
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/_manifest.json
==> Downloading
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/_sur.bottle.tar.gz
==> Reinstalling [email protected]
==> Pouring [email protected]_sur.bottle.tar.gz
==> Regenerating CA certificate bundle from keychain, this may take a while...
🍺 /usr/local/Cellar/[email protected]/1.1.1l: 8,073 files, 18.5MB
Removing: /usr/local/Cellar/[email protected]/1.1.1k... (8,071 files, 18.5MB)
Removing: /Users/davea/Library/Caches/Homebrew/[email protected]... (5.4MB)The above seems to imply I have already installed version 1.1.1, but when I check on the command line, I see the following:
$ openssl version
LibreSSL 2.8.3
$ which openssl
/usr/bin/opensslWhere is this newer version of OpenSSL coming from and how can I make the versions consistent on my machine?
21 Answer
You could add something like this to your shell so that your environment picks up brew version.
export PATH="/usr/local/opt/openssl@1/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl@1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1/include"