"Symbol not found: __cg_jpeg_resync_to_restart" 与 djangostack

"Symbol not found: __cg_jpeg_resync_to_restart" with djangostack

我正在尝试将 Django 1.6.10-0 连接到之前在 1.5 上 运行 的项目。

在我的项目中编辑 wsgi.py 文件以包含项目路径后,出现此错误:

mod_wsgi (pid=6805): Exception occurred processing WSGI script '/Users/Dreadfort/Documents/MyProject/project/wsgi.py'.
 Traceback (most recent call last):
   File "/Applications/djangostack-1.6.10-0/apps/django/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 187, in __call__
     self.load_middleware()
   File "/Applications/djangostack-1.6.10-0/apps/django/lib/python2.7/site-packages/django/core/handlers/base.py", line 44, in load_middleware
     for middleware_path in settings.MIDDLEWARE_CLASSES:
   File "/Applications/djangostack-1.6.10-0/apps/django/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
     self._setup(name)
   File "/Applications/djangostack-1.6.10-0/apps/django/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in _setup
     self._wrapped = Settings(settings_module)
   File "/Applications/djangostack-1.6.10-0/apps/django/lib/python2.7/site-packages/django/conf/__init__.py", line 128, in __init__
     mod = importlib.import_module(self.SETTINGS_MODULE)
   File "/Applications/djangostack-1.6.10-0/apps/django/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
     __import__(name)
   File "/Users/Dreadfort/Documents/MyProject/project/__init__.py", line 5, in <module>
     from .celery import app as celery_app
   File "/Users/Dreadfort/Documents/MyProject/project/celery.py", line 5, in <module>
     from celery import Celery
   File "/Applications/djangostack-1.6.10-0/python/lib/python2.7/site-packages/celery/__init__.py", line 130, in <module>
     from celery import five
   File "/Applications/djangostack-1.6.10-0/python/lib/python2.7/site-packages/celery/five.py", line 51, in <module>
     from kombu.five import monotonic
   File "/Applications/djangostack-1.6.10-0/python/lib/python2.7/site-packages/kombu/five.py", line 54, in <module>
     use_errno=True)
   File "/Applications/djangostack-1.6.10-0/python/lib/python2.7/ctypes/__init__.py", line 365, in __init__
     self._handle = _dlopen(self._name, mode)
 OSError: dlopen(/System/Library/Frameworks/CoreServices.framework/CoreServices, 6): Symbol not found: __cg_jpeg_resync_to_restart
   Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
   Expected in: /Applications/djangostack-1.6.10-0/common/lib/libJPEG.dylib
  in /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib

我的 wsgi.py 文件如下所示:

import os, sys

sys.path.append('/Users/Dreadfort/Documents/MyProject')
sys.path.append('/Users/Dreadfort/Documents/MyProject/project')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

我以前从未见过类似的东西,所以让我知道您可能还需要查看什么以提供帮助。提前致谢!

试试这个:

    cd /Applications/djangostack-1.6.10-0/common/lib/
    mv libJPEG.dylib libJPEG.dylib.backup
    ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libJPEG.dylib libJPEG.dylib
    mv libPng.dylib libPng.dylib.backup
    ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libPng.dylib libPng.dylib

MAMP : dyld: Symbol not found: __cg_jpeg_resync_to_restart Referenced from: /System/Library