[mod_python] mod_python install fails

Jorey Bump list at joreybump.com
Wed Apr 4 11:22:05 EDT 2007

Brian McCann wrote:

> These are the versions\locations on our server
> [root at sirius1 bin]# /opt/CollabNet_Subversion/bin/httpd -V
> Server version: Apache/2.2.3
> Server built:   Feb  5 2007 13:01:55
> I cp this httpd file to httpd2 and put that file in /etc

Why would you do that?

> this is what I get now whenI run configure, make, make 
> install[root at sirius1 mod_python-3.3.1]# ./configure 
> --with-python=/usr/bin/python2.3 --with-apxs=/usr/sbin/apxs2 
> --with-flex=/usr/bin/flex

You're still using an apxs that doesn't match your target Apache 
installation. As root, run the following commands:

  locate apxs

See if the output shows apxs somewhere within your CollabNet installation.

> and the try to restart apache I get this garbled error
> [root at sirius1 bin]# apachectl restart
> httpd: Syntax error on line 55 of 
> /etc/opt/CollabNet_Subversion/conf/httpd.conf: API module structure 
> `python_module' in file /usr/lib/apache2/mod_pyt
> hon.so is garbled - perhaps this is not an Apache module DSO?
> [root at sirius1 bin]#
> CollabNet did not come with apxs2 so I installe dthe package apache2-devel

That will only work for Red Hat's corresponding Apache RPM. Keep in mind 
that the original upstream Apache httpd distribution doesn't use the 
names apxs2 or httpd2, a convention used by packagers to support 
installing Apache httpd versions 1.x and 2.x on the same machine. A 
vanilla installation of httpd will simply provide apxs and httpd. I have 
no familiarity with CollabNet, but if they're distributing Apache, they 
must provide the source, so you will be able to install a working apxs, 
somehow. They may even supply it as another package. In any case, you 
should use the apxs that corresponds to your target Apache installation.

Once you understand it, the default Apache httpd is flexible and well 
designed. If CollabNet hasn't crippled it in any way, it should be easy 
to add functionality like mod_python.

More information about the Mod_python mailing list