[mod_python] Trouble on OSX - Leopard

Graham Dumpleton graham.dumpleton at gmail.com
Mon Oct 29 17:30:05 EDT 2007


On 30/10/2007, Ben Mitchell <ben at mitchellfamily.com> wrote:
> Hi, folks.
>
> I'm working on getting Django running again after upgrading to Leopard.
> I've hit a snag building / installing mod_python, and I'm hoping someone
> might know what's going on.
>
> I did the following:
> - downloaded the 3.3.1 source
> - .config --with-apxs=/usr/sbin/apxs
> - make
> - sudo make install
> - added to httpd.conf:  LoadModule python_module
> libexec/apache2/mod_python.so
>
> I then ran apachectl configtest and got an error:
>
> % apachectl configtest
> httpd: Syntax error on line 116 of
> /private/etc/apache2/httpd.conf: Cannot load
> /usr/libexec/apache2/mod_python.so into server:
> dlopen(/usr/libexec/apache2/mod_python.so, 10): no suitable
> image found.  Did
> find:\n\t/usr/libexec/apache2/mod_python.so: no matching
> architecture in universal wrapper
> Any ideas?  I've tried a bunch of things tracking this down, but I get this
> same error every time.

Can you do a quick test and see if you can install mod_wsgi
(http://www.modwsgi.org) instead. This can replace mod_python if all
you want to host is Django, but more importantly it follows somewhat
how mod_python is installed but is less complicated in the way it does
it. It will be easier for me to debug what the problem is if mod_wsgi
has the same issue. Can then apply what is learned from that back to
mod_python and get it working.

BTW, I presume you are using standard OS version of Python. Which
version of Python does Leopard supply if that is the case?

If you try mod_wsgi and it also fails, supply the output from doing
the initial 'make' of it so can see all the compiler flags that are
being used to build it, plus any output from compiler.

Thanks.

Graham


More information about the Mod_python mailing list