dyld:懒惰的符号绑定失败:找不到符号:_PQsetErrorContextVisibility
问题描述:
跑步时
$ psql
我收到此错误
dyld: lazy symbol binding failed: Symbol not found:
_PQsetErrorContextVisibility
Referenced from: /usr/local/bin/psql
Expected in: /usr/local/lib/libpq.5.dylib
dyld: Symbol not found: _PQsetErrorContextVisibility
Referenced from: /usr/local/bin/psql
Expected in: /usr/local/lib/libpq.5.dylib
Abort trap: 6
我尝试了一些事情:
- 很少有文章建议更新brew
- 很少有人建议将/usr/local/bin/psql添加到〜/.bash_profile并重新启动系统
- 很少有人说这是XCode的问题,但是我没有安装XCode,所以我猜它对我无效.
但没有一个起作用.
我的bash_profile看起来像这样
my bash_profile looks like this
PATH="/usr/local/bin/psql:/usr/local/sbin:/usr/local/bin:/sbin:/bin
:/usr/sbin:/usr/bin:/root/bin:/usr/local/bin/geckodriver:$PATH"
export PATH
我正在使用:
- psql(PostgreSQL)9.6.2
- macOS Sierra版本10.12.3
答
我也在PostgreSQL 9.6.2上, 并遇到了同样的问题.
I was on PostgreSQL 9.6.2 as well, and ran into the same problem.
我使用这样的brew升级到9.6.3:
I upgraded to 9.6.3 using brew like this:
rm '/usr/local/lib/libpq.5.dylib'
brew upgrade postgresql
brew link postgresql
它起作用了,现在我又可以通过psql进行访问了.
It worked, and now I have access via psql again.