Windows – Linux – Mac OSX Guides

Macosx Snow Leopard and mod_python

I’m using Snow Leopard 10.6.4 and it’s already shipped with Apache 2.2. To compile mod_python on Snow Leopard you should have GCC (which is not installed by default on Snow Leopard, and you have to install from the XCode SDK – I had a post addressed on the installation of XCode here ).

– After installing Xcode, get your mod_python (I used the latest one: mod_python 3.3.1) from

$ tar xvzf mod_python-3.3.1.tar
$ cd mod_python-3.3.1
$ ./configure –with-apxs=/usr/sbin/apxs
$ make
$ sudo make install

– You will get the error

connobject.c:142: error: request for member ‘next’ in something not a structure or union apxs:Error: Command failed with rc=65536

But don’t worry, we have a patch for that

– Download the patch from

– Unpack the patch to the mod_python-3.3.1 folder

– Go to the mod_python-3.3.1 folder & apply the patch

$ cd mod_python-3.3.1
$ patch -p1 < mod_python-3.3.1-apr.patch

– Now compile & install mod_python again

$ ./configure –with-apxs=/usr/sbin/apxs
$ make
$ sudo make

Good luck!

Tagged with:     , , ,

Related Articles

Loading Facebook Comments ...

1 Comment

Post your comments

Your email address will not be published. Required fields are marked *