mac postgress - 库未加载:/usr/local/lib/libpq.5.dylib

问题描述 投票:0回答:1

我尝试在 Mac 上安装并运行 postgres 16,但收到此错误

dyld[30279]: Library not loaded: /usr/local/lib/libpq.5.dylib
  Referenced from: <4A4C9EBE-1868-317F-A86C-2DAE62CA9064> /usr/local/bin/psql
  Reason: tried: '/usr/local/lib/libpq.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/libpq.5.dylib' (no such file), '/usr/local/lib/libpq.5.dylib' (no such file), '/usr/lib/libpq.5.dylib' (no such file, not in dyld cache)
[1]    30279 abort      psql

这是我在收到错误之前所做的

brew install postgresql@16
brew services start postgresql@16
brew services list
psql
postgresql homebrew
1个回答
0
投票

我解决了这个问题 我就是这么做的

rm -rf /usr/local/bin/psql
并删除所有由 homebrew 安装的 postgres 然后从
https://postgresapp.com/downloads.html
安装 postgres 应用程序 现在我的
psql
命令可以工作了

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.