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 http://www.modpython.org/
$ 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 https://bugzilla.redhat.com/show_bug.cgi?id=465246
- 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
install
Good luck!
