Skip to content

Instantly share code, notes, and snippets.

@0xadada
Last active April 8, 2019 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xadada/be24fdd8e5e8d5bb5448dfee6ef0a4ea to your computer and use it in GitHub Desktop.
Save 0xadada/be24fdd8e5e8d5bb5448dfee6ef0a4ea to your computer and use it in GitHub Desktop.
pin homebrew readline to version 7.0.5, permanantly
#!/usr/bin/env bash
# Uninstall this incompatible version
brew uninstall --ignore-dependencies readline
# Go to the local clone of homebrew-core
pushd "$(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core"
# Move to the homebrew-core revision that had 7.0.5, last version before 8
# see: https://raw.githubusercontent.com/Homebrew/homebrew-core/b1bd1c4a62e1336422de3614d1fc49ffbce589a8/Formula/readline.rb
git checkout b1bd1c4a62e1336422de3614d1fc49ffbce589a8
# Re-install readline
brew reinstall readline
# Switch back to HEAD
git checkout master
# Pin readline so this can't happen again
brew pin readline
popd
# just for reference, another fix:
# optionally, kill it with fire.
# ln -s /usr/local/opt/readline/lib/libreadline.8.0.dylib /usr/local/opt/readline/lib/libreadline.7.dylib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment