mod-python on Mac OSX 10.5

Arnaud Delobelle arnodel at
Tue Jan 8 22:59:37 CET 2008

On Jan 8, 5:27 am, Gnarlodious <lists.gnarlodi... at> wrote:
> I am trying to install mod_python on OSX 10.5, Intel version.
> sudo apachectl configtest tells me this:
> httpd: Syntax error on line 114 of /private/etc/apache2/httpd.conf:
> Cannot load /usr/libexec/apache2/ into server:
> dlopen(/usr/libexec/apache2/, 10): no suitable image
> found. Did find:\n\t/usr/libexec/apache2/ mach-o, but
> wrong architecture
> I attempted to follow instructions found on these pages but it didn't work:
> <>
> <>
> Can
> anyone tell me what is causing this error?

(Sorry no time to read the references you provide)

This is because httpd is running in 64 bits (arch x86_64) but is only 32 bits by default.  You need to modify this.
what I did was:

make the following changes to src/Makefile:
* Add -arch x86_64 to the LDFLAGS line
* Change the build line in to:
        $(APXS) $(INCLUDES) -c -Wc,"-arch x86_64" $(SRCS) $(LDFLAGS) $

Now that I look at this, I don' know if both are necessary... But it
worked for me.

There was a discussion to the mod_python mailing list in october 2007:


More information about the Python-list mailing list