Libssl 和 libcrypto 导致 dyld: Library not loaded: /usr/lib/libpq.5.dylib

新手上路,请多包涵

我最近卸载了 postgresql 并通过 pip 安装了 pyscopg2。

我知道 libcrypto 和 libssl 涉及一些技巧

目前我将它们链接到:

 $ ls -lah libssl.*
-rwxr-xr-x  1 root  wheel   402K Aug 28 11:06 libssl.0.9.7.dylib
-rwxr-xr-x  1 root  wheel   589K Aug 28 11:06 libssl.0.9.8.dylib
lrwxr-xr-x  1 root  wheel    55B Nov 29 23:38 libssl.1.0.0.dylib -> /usr/local/Cellar/openssl/1.0.1c/lib/libssl.1.0.0.dylib
lrwxr-xr-x  1 root  wheel    55B Nov 30 02:25 libssl.dylib -> /usr/local/Cellar/openssl/1.0.1c/lib/libssl.1.0.0.dylib

/usr/lib
$ ls -lah libcrypto.*
-rwxr-xr-x  1 root  wheel   2.1M Aug 28 11:06 libcrypto.0.9.7.dylib
-rwxr-xr-x  1 root  wheel   2.6M Aug 28 11:06 libcrypto.0.9.8.dylib
-r-xr-xr-x  1 root  wheel   1.6M Oct 31 22:12 libcrypto.1.0.0.dylib
lrwxr-xr-x  1 root  wheel    58B Nov 30 02:27 libcrypto.dylib -> /usr/local/Cellar/openssl/1.0.1c/lib/libcrypto.1.0.0.dylib

我通过端口安装了openssl

现在当我运行 arc diff 时,我得到了臭名昭著的

$ arc diff
dyld: Library not loaded: /usr/lib/libpq.5.dylib
  Referenced from: /usr/bin/php
  Reason: image not found
Trace/BPT trap: 5

SO 中有一些答案,其中讨论了将这些库符号链接到 postgresql 安装目录。显然,这对我不起作用。

我应该怎么办?

原文由 xjq233p_1 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 528
2 个回答

原来 /usr/lib/libpq.5.dylib 不存在,但 /usr/lib/libpq.5.4.dylib 不存在。

 sudo ln -s /usr/lib/libpq.5.4.dylib /usr/lib/libpq.5.dylib

解决了这个问题。

原文由 xjq233p_1 发布,翻译遵循 CC BY-SA 3.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题