“没有找到符号:__cg_jpeg_resync_to_restart”与djangostack

时间:2015-03-02 07:57:29

标签: python django wsgi osx-yosemite bitnami

我正在尝试将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()

我以前从未见过这样的东西,所以让我知道你还需要什么来帮助。提前谢谢!

1 个答案:

答案 0 :(得分:4)

试试这个:

    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