At a guess you have multiple Python versions installed and not using the standard default Apple Python version.
When you configure mod_wsgi before building, add the configure option: --disable-framework Framework linking seems to have been screwed up again on Lion for non default Python versions and need to use more traditional UNIX -L linking style. Graham On 17 May 2012 09:48, Kevin King <[email protected]> wrote: > I re-ran the code from the Mercurial clone (last modified Mon May 07 > 17:15:19 2012 +1000; 4.0-trunk) and the similar error resulted: > > sh-3.2# /usr/local/apache2/bin/apachectl -t > httpd: Syntax error on line 149 of /usr/local/apache2/conf/httpd.conf: > Cannot load /usr/local/apache2/modules/mod_wsgi.so into server: > dlopen(/usr/local/apache2/modules/mod_wsgi.so, 10): Symbol not found: > __Py_FalseStruct\n Referenced from: > /usr/local/apache2/modules/mod_wsgi.so\n Expected in: flat namespace\n in > /usr/local/apache2/modules/mod_wsgi.so > > This time it is not finding " __Py_FalseStruct" while version 3.3 was having > issues with "__ap_accept_lock_mech". Not sure if this can be interpreted as > progress, but perhaps it is a clue. ;-) > > Kevin > > > On May 16, 2012, at 5:29 PM, Graham Dumpleton wrote: > > > > You cannot use mod_wsgi 3.3 source code or precompiled binary, you need to > use 3.X or 4.X branches from mod_wsgi source code repository. What code or > binary were you using? > > Graham > > On 17/05/2012, at 5:47 AM, Abilard <[email protected]> wrote: > > Yesterday I installed Apache 2.4.2 on Mac OS X 10.7.4, creating a plist file > to launch it at boot (Apple's built-in web sharing is turned off). MySQL > and PHP were installed next: > > PHP 5.3.10 with Suhosin-Patch (cli) > mysql Ver 14.14 Distrib 5.5.24, for osx10.6 (i386) > > The PHP module (libphp5.so) is running happily. I then attempted to setup > Apache to handle Python through mod_wsgi.so and am encountering the > following error when I test the config file: > > httpd: Syntax error on line 149 of /usr/local/apache2/conf/httpd.conf: > Cannot load /usr/local/apache2/modules/mod_wsgi.so into server: > dlopen(/usr/local/apache2/modules/mod_wsgi.so, 10): Symbol not found: > _ap_accept_lock_mech\n Referenced from: > /usr/local/apache2/modules/mod_wsgi.so\n Expected in: flat namespace\n in > /usr/local/apache2/modules/mod_wsgi.so > > Searching the web turned up these hypotheses as to what might cause errors > of this kind: > > Mixing 64-bit Apache and 32-bit Python. > Running old versions of Python. > Having multiple versions of Apache. > Not using MacPorts. > Not using HomeBrew. > Not using Linux. > > I've attempted forcing Apache to run in 32-bit mode; putting Python 3.2 in > the path; specifying apxs2 & python during configure; altering the Makefile > to ensure proper architecture; using MacPorts; installing HomeBrew and > running the other way; and half a dozen other things I have forgotten now to > no avail. As for #6, my Ubuntu dev box is running mod_python just fine. My > goal is getting my MacBook Pro to run mod_wsgi.so (which, I gather, is now > preferred over mod_python). > > Any ideas? > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/modwsgi/-/-8UvZJ9UJCoJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
