我不是 Homebrew 专家,但我认为它在 9/15/16 之后的某个时间将我从 readline 版本 6.x“升级”到 7.0。 :
eat@eric-macbook:Homebrew$ brew info readline
readline: stable 7.0 (bottled) [keg-only]
Library for command-line editing
https://tiswww.case.edu/php/chet/readline/rltop.html
/usr/local/Cellar/readline/7.0 (45 files, 2M)
这让我的 9.4.5 Homebrew 版本的 Postgresql 很头疼(出于可比性的原因,我需要旧的 9.4):
eat@eric-macbook:~$ psql --version
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib
Referenced from: /usr/local/Cellar/postgresql/9.4.5/bin/psql
Reason: image not found
Trace/BPT trap: 5
不幸的是,我无法在 Homebrew 上找到 6.x 版本的 readline 以恢复到 - 似乎只有 7.0 可用(?)。
我的问题有两个:
- readline 版本不匹配是我的 postgres/psql 问题的原因吗?
- 如果是这样,我如何使用 Homebrew 返回 6.x 来更正问题?
提前致谢!
最佳答案
回答具体问题。
您可以在本地仍然存在的已安装 brew 包的版本之间切换,如本问题中所述: Homebrew install specific version of formula?
要降级到 readline 6.x,以下命令对我有用:
brew switch readline 6.3.8
关于postgresql - 返回 Homebrew 中的 readline 版本 6.x 以修复 Postgresql?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39823011/