“OSError: dlopen(libSystem.dylib, 6): image not found” (OS X + macports + Celery 3.1.7)

匿名 (未验证) 提交于 2019-12-03 02:03:01

问题:

I just updated celery via pip (1.5) to the latest version (3.1.7), but I get a fatal exception which I don't understand as soon I try to import the library. By running:

from celery import Celery in the shell I get:

File "", line 1, in    File "/Users/davidezanotti/CygoraPythonEnv/lib/python2.7/site-packages/celery/__init__.py", line 130, in      from .five import recreate_module   File "/Users/davidezanotti/CygoraPythonEnv/lib/python2.7/site-packages/celery/five.py", line 51, in      from kombu.five import monotonic   File "/Users/davidezanotti/CygoraPythonEnv/lib/python2.7/site-packages/kombu/five.py", line 47, in      libSystem = ctypes.CDLL('libSystem.dylib')   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__     self._handle = _dlopen(self._name, mode) OSError: dlopen(libSystem.dylib, 6): image not found 

I'm using python 2.7.6 with VirtualEnv and macports on OS X 10.8.5

I understand that the problem is that an underlying dependency ("libSystem.dylib") is missing, but I don't know how to fix this issue

(under /usr/lib/ I can find libSystem.dylib on my machine)

回答1:

Just add /usr/lib to DYLD_FALLBACK_LIBRARY_PATH will resolve this issue.



回答2:

The problem was that I had defined a DYLD_FALLBACK_LIBRARY_PATH in my .bash_profile, by following literally the notes about macports in Django documentation on postgis: https://docs.djangoproject.com/en/1.6/ref/contrib/gis/install/#macports

but this leads to unexpected behavior like the one I faced, anyway by commenting it out, all seems to work!



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!