0

I get this error when I try to run my django site on apache. The site works on the development server:

ViewDoesNotExist at / 
Could not import myproject.modulename.views. Error was: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so, 2): Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /Applications/MAMP/Library/lib/libjpeg.8.dylib

I am not sure how to resolve the issue. Other django sites work on this apache installation. The directory is on the path specified in my apache.conf file (see bottom of the post).

The three files referenced in the error message exist in the locations indicated.

  1. _tkinter.so - /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so

  2. ImageIO - /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO

  3. libjpeg.8.dylib - /Applications/MAMP/Library/lib/libjpeg.8.dylib

I am not sure what __cg_jpeg_resync_to_restart is.

Below is the original message I put up when I was trying to figure out what the error message meant. Thanks to sacabuche for pointing me in the right direction.

I am trying to get a Django Site to run on apache. It works on the django development server, but I get this error when I try to run it on apache with mod_wsgi. I know mod_wsgi works because I had a small trial site (that was a scaled down version of this stie) working on my mamp development server. A feat I managed with the help of others via this post: Django/mod_wsgi and PHP as Virtual Hosts on same Apache Server using MAMP

The new site uses a different database and is now at the localhost root, but otherwise is very similar, so this error is baffling me.

Here is the code for my apache conf (note: the php site works, and if I redirect the WSGIDaemonProcess to the old site, it loads without problem):

ServerName localhost UseCanonicalName Off DocumentRoot "/Applications/MAMP/htdocs"

Alias /phpsite /Applications/MAMP/htdocs/phpsite
    <Directory "/Applications/MAMP/htdocs/phpsite">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    WSGIDaemonProcess site1 display-name=%{GROUP}
    WSGIProcessGroup site1
    Alias /media/ /Applications/MAMP/htdocs/media/
    <Directory /Applications/MAMP/htdocs/media>
        Options ExecCGI 
        Order deny,allow
        Allow from all
    </Directory>
    WSGIScriptAlias / /Users/sequoia/djangoprojects/myproject/apache/django.wsgi
    <Directory /Users/sequoia/djangoprojects/myproject/apache>
        Order deny,allow
        Allow from all
    </Directory>
</VirtualHost>

Thanks.

Community
  • 1
  • 1
sequoia
  • 3,025
  • 8
  • 33
  • 41
  • Is your project on the path? In some shared servers you have to change the name of django.wsgi – sacabuche Jul 25 '11 at 01:23
  • The project is on the path specified. It does seem like there is a path mismatch, but I have checked the paths 20 times. I'll try renaming django.wsgi – sequoia Jul 25 '11 at 02:14
  • no, unfortunately it has not been resolved. I think you are right that it is a dynamic linking problem, but using the commands you provided below with modifications to match the file names referenced in the error message above does not eliminate the problem. I haven't had time attend to this. When I find a solution or make some progress I will follow up here. – sequoia Aug 03 '11 at 21:12

2 Answers2

0

Don't you miss the + or - sign in your options statement? Example of statement: Options -Indexes +FollowSymLinks

Serge
  • 11
  • 1
  • Welcome to StackOverflow. I suggest to don’t answer unless you know exactly how to solve or properly answer what is asked for, when you'll get more reputation, you can comment, and in this case your answer normally would be better as a comment for clarification etc. I tell you this so that you avoid getting down-votes! Have a look here --> [comment everywhere](https://stackoverflow.com/help/privileges/comment#:~:text=What%20are%20comments%3F,they're%20gone%20for%20good.) – Federico Baù Jan 08 '21 at 14:44
0

Well it seems that a symlink is broken, so i looked and i found something in this forum

delete the symlinks "libpng.dylib" and "libjpeg.dylib" in "<installation directory>/lib"

Create new symlinks to the right libs.

ln -s /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPNG.dylib /Applications/MAMP/Library/lib/libPNG.dylib

ln -s /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib /Applications/MAMP/Library/lib/libJPEG.dylib

I have no Mac rigth here, but first i would verify that the origin of the symlink exist, i hope this will solve your problem.

sacabuche
  • 2,781
  • 1
  • 27
  • 35