本文介绍了找不到 Psycopg2 图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试使用 postgres mac 应用程序设置 postgres 并遇到此错误,我一直无法解决.有什么想法吗?
Trying to setup postgres with the postgres mac app and hit this error, which I haven't been able to solve. Any thoughts?
ImportError: dlopen(/Users/Craig/pyenv/mysite/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Library not loaded: @executable_path/../lib/libssl.1.0.0.dylib
Referenced from: /Applications/Postgres.app/Contents/MacOS/lib/libpq.dylib
Reason: image not found
推荐答案
$ sudo ln -s /Library/PostgreSQL/9.2/lib/libssl.1.0.0.dylib /usr/lib
$ sudo ln -s /Library/PostgreSQL/9.2/lib/libcrypto.1.0.0.dylib /usr/lib
我在处理 Django 时遇到了这个错误.我让它在 Django==1.3 的 virtualenv 上工作,但不是在 Django==1.5 上我必须发出上面的命令.
I encountered this error while working on Django.I have it working on virtualenv with Django==1.3 but not on Django==1.5 where I have to issue the commands above.
在 OS X El Capitan 中,您不能在不禁用系统保护的情况下执行这些链接,但如果您链接到/usr/local/lib 则效果很好
In OS X El Capitan you can't do these links without disabling system protection but it works well if you link to /usr/local/lib
这篇关于找不到 Psycopg2 图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!