Skip to content

Instantly share code, notes, and snippets.

@nicksieger
Created January 7, 2020 21:15
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicksieger/fcd1e72420ddee57072ee2948a71539a to your computer and use it in GitHub Desktop.
Save nicksieger/fcd1e72420ddee57072ee2948a71539a to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Homebrew has removed openssl 1.0 from the core repo, making the default
# openssl 1.1. We still have a number of packages that rely on openssl 1.0
# (including ruby 2.2.7), so we need to bring it back.
# Commit 0349a7ca76f483483c6d5c1d4cfe6b458dee2665 is the commit that removed 1.0
# from the repo. Commit 30fd2b68feb458656c2da2b91e577960b11c42f4 is its parent
# commit that still has 1.0.
# Uninstall 1.1 if it is currently installed as 'openssl'
if brew ls openssl 2>&1 | grep -q '/1\.1\.'; then
install_openssl11=1
brew uninstall --force openssl
fi
cd $(brew --repo Homebrew/homebrew-core)
git fetch --unshallow
git checkout 30fd2b68feb458656c2da2b91e577960b11c42f4
HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl
# Reinstall openssl@1.1 if necessary
if [ "$install_openssl11" ]; then
brew install openssl@1.1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment