问题
$ psql
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/Cellar/postgresql@9.6/9.6.10/lib/libpq.5.dylib
Reason: image not found
[1] 95508 abort psql
复制代码
环境
MBP 10.14.5
解决思路
cd /usr/local/Cellar
ll
# ...... 3 31 17:18 openssl
# ...... 3 31 17:09 openssl@1.1
cd /usr/local/opt
ll
# ...... 3 25 17:50 openssl -> ../Cellar/openssl@1.1/1.1.1d
# ...... 11 27 2018 openssl@1.0 -> ../Cellar/openssl/1.0.2q
# ...... 3 25 17:50 openssl@1.1 -> ../Cellar/openssl@1.1/1.1.1d
复制代码
cd /usr/local/Cellar/openssl
ll
# ...... 11 27 2018 1.0.2q
复制代码
cd /usr/local/opt
ls
brew switch openssl 1.0.2q # 执行报错的话也可以手动修改
复制代码
手动修改:
将 /usr/local/opt 路径下,真实指向 openssl 版本号的文件夹,即
openssl@1.0 -> ../Cellar/openssl/1.0.2q
的名字改为 openssl ,注意原来这个名字的文件夹要换成其他名字。
评论