Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save XxUnkn0wnxX/a002c2e70bb632c676d3a3b1617ab680 to your computer and use it in GitHub Desktop.
Save XxUnkn0wnxX/a002c2e70bb632c676d3a3b1617ab680 to your computer and use it in GitHub Desktop.
macOS Catalina, 10.15, setup openssl from source via homebrew manually
this just a small guide for those who need openssl@1.0 as homebrew has officially removed ths from their formula list.
make sure you have xcode installed & command line tools, run: xcode-select --install after you have intalled xcode
DL the 1.02 ver you want from here: https://github.com/openssl/openssl/releases | https://www.openssl.org/source/old/1.0.2/
extract to /usr/local/src (create src folder if it doesnt exsist)
in terminal CD into the folder EG: cd /usr/local/src/OpenSSL_1_0_2u
then run: brew diy --name openssl@1.0 --version 1.0.2u | (where version type in the version you are using)
should print you a prefix simular to this: --prefix=/usr/local/Cellar/openssl@1.0/1.0.2u
then run ./configure darwin64-x86_64-cc -shared --prefix=/usr/local/Cellar/openssl@1.0/1.0.2u | (where prefix use the one given to you)
once its done run: make depend && make && make install
if you have compling issues, you may need to run: sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/
this will properly link the contents of the inlcudes folder to the new locaiton of the SDK which was changed in Catalina 10.15.4.
if you encounter other compiling issues, you may need to solve these on your own.
ignore any of the warnings it throws as you...
then to link it all up as brew link openssl@1.0 doesnt work...
run these:
ln -sfn /usr/local/Cellar/openssl@1.0/1.0.2u/ /usr/local/opt/openssl@1.0 # note change "/openssl@1.0/1.0.2u/" to what ever your version is
ln -sfn /usr/local/opt/openssl@1.0 /usr/local/opt/openssl
ln -sf /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -sf /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
ln -sf /usr/local/opt/openssl/bin/openssl /usr/local/bin/
ln -sf /usr/local/opt/openssl/lib/libcrypto.dylib /usr/local/lib/
ln -sf /usr/local/opt/openssl/lib/libssl.dylib /usr/local/lib/
ln -sf /usr/local/opt/openssl/include/openssl /usr/local/include
Note: when you update openssl@1.1 via brew it will overwrite the /usr/local/opt/openssl link, you will need to re-run ln -sfn /usr/local/opt/openssl@1.0 /usr/local/opt/openssl
everytime brew updates openssl@1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment