Mac psql / readline

编程入门 行业动态 更新时间:2024-10-27 03:35:42
本文介绍了Mac psql / readline-未加载库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在Mac上使用Sierra 10.12.3,并且正在尝试通过 psql 命令访问PostgreSQL数据库,但是它引发了错误

I'm working on a Mac, Sierra 10.12.3, and I'm trying to access a PostgreSQL database via the psql command, but it threw the error

dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib Referenced from: /usr/local/bin/psql Reason: image not found Abort trap: 6

在一两天前,我正在和某人一起工作,需要安装pip,所以我跑了 brew install pip ,这一切都很好。从那以后,这是我第一次尝试运行 psql ,但我不确定这与我的问题有什么关系,但是似乎很可能是因为我没有

A day or two ago, I was working with someone and I needed to install pip, so I ran brew install pip, and it was all good. This is the first time I'm trying to run psql since then and I'm not certain that this has anything to do with my problem, but it seems likely since I haven't made any other changes.

现在我做了一些侦探工作,发现如果我去 / usr / local / opt / 确实存在一个 readline 别名目录,该目录指向 /usr/local/Cellar/readline/7.0.1 (似乎也已经安装了7.0.1版-可能作为pip的一部分?也许我是错误地做的...),因此应该抛出原始错误在某种意义上是合理的。我将别名更改为指向 /usr/local/Cellar/readline/6.3.8 ,错误略有变化:

Now I did a little detective work and found that if I went to /usr/local/opt/ there was indeed a readline alias directory that pointed to /usr/local/Cellar/readline/7.0.1 (version 7.0.1 also seeming to have gotten installed at some point - maybe as part of pip? Maybe I did it by mistake...) so it made some sense that the original error should be thrown. I changed the alias to point to /usr/local/Cellar/readline/6.3.8 and the error changed slightly:

dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib Referenced from: /usr/local/bin/psql Reason: no suitable image found. Did find: /usr/local/opt/readline/lib/libreadline.6.dylib: stat() failed with errno=20 Abort trap: 6

所以我似乎在某个地方遇到了 ,但仍然遇到了问题。如果有人可以提出解决方案,我将永远感激不已。

So it seems like I'm getting somewhere, but still having an issue. If anyone can shed some light on a solution, I would be forever grateful.

推荐答案

我能够通过简单地运行来解决此问题。 酿造开关阅读线6.3.8

I was able to resolve this by simply running brew switch readline 6.3.8

更多推荐

Mac psql / readline

本文发布于:2023-11-26 15:34:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634282.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Mac   psql   readline

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!