[mod_python] mod_python on FreeBSD 6.1 gives Syntax error - mod_python.so: unsupported file layout

Graham Dumpleton graham.dumpleton at gmail.com
Mon Jul 2 01:39:04 EDT 2007


For more information on BSD ports, one can go to:

  http://www.freebsd.org/ports/

Graham

On 02/07/07, Rajeev Nair <rajeev.nair at gridstoneresearch.com> wrote:
> Hi Jeff,
>
> Thanks for the reply. We have installed apache from source files and thats
> how we always have been doing. Few questions:
> 1) So what exactly do you mean installing from ports? Is it something of an
> RPM equivalent for FreeBSD?
> 2)And do we need to install all the packages that we installed through
> source to be installed with ports again?
> 3)We already have two separate instances of apache already running on the
> server.
> 4)Will this installation affect that by any chance?
>
> We shall also appreciate if you could forward some links also that can help
> us expedite this issue soon.
>
> Regards,
> Rajeev
>
> -----Original Message-----
> From: dundeemt at gmail.com [mailto:dundeemt at gmail.com] On Behalf Of Jeff
> Hinrichs - DM&T
> Sent: Sunday, July 01, 2007 6:48 PM
> To: Graham Dumpleton
> Cc: anthony_raj at persistent.co.in; mod_python at modpython.org;
> rajeev.nair at gridstoneresearch.com
> Subject: Re: [mod_python] mod_python on FreeBSD 6.1 gives Syntax error -
> mod_python.so: unsupported file layout
>
> On 6/30/07, Graham Dumpleton <graham.dumpleton at gmail.com> wrote:
> > Usually these problems are caused through using the mod_python.so with
> > a version of Apache which is different to the version of Apache that
> > mod_python was compiled against. This can especially occur where you
> > have a standard OS installation of Apache but you try and use an
> > alternate version under /usr/local/ or elsewhere.
> >
> > What options did you use with 'configure' when you ran it? Did the
> > compile line correctly pick up includes and libraries from the version
> > under /usr/local?
> >
> > Graham
> >
> > On 01/07/07, Anthony Raj <anthony_raj at persistent.co.in> wrote:
> > > Hi Folks,
> > >
> > > Have come to the community with a new issue with regard to installing
> mod_python on FreeBSD.
> > >
> > > Eariler had installed apache/mod_python on
> > > Suse 10 / 64 Arch.
> > > - Apache 2.2.4
> > > - mod_python 3.3.1
> > > - apr 1.2.8
> > > - apr-util 1.2.8
> > >
> > > problems -
> > > The issue with mod_python being installed in to locations.
> > > Managed to get it working on this setup sucessfully.
> > > ---
> > >
> > > Now I've installed the same configuration on
> > > Free BSD 6.1 32 Arch.
> > > >>>>
> > > FreeBSD perputo3.inetu.net 6.1-RELEASE-p3 FreeBSD 6.1-RELEASE-p3 #107:
> Mon Nov  6 20:31:10 EST 2006
> root at turnip.inetu.org:/usr/obj/usr/src/sys/INU6  i386
> > > >>>>
> > >
> > > Installation was completed successfully for all the above modules.
> > >
> > > But after adding the required configuration line -
> > > >>>
> > > LoadModule python_module modules/mod_python.so
> > > >>>
> > >
> > > And restarting apache , it throws the following error
> > > >>>>
> > > /usr/local/apache-ast>./bin/apachectl start
> > > httpd: Syntax error on line 54 of /usr/local/apache-ast/conf/httpd.conf:
> Cannot load /usr/local/apache-ast/modules/mod_python.so into server:
> /usr/local/apache-ast/modules/mod_python.so: unsupported file layout
> > >
> > > >>>>
> > >
> > > The required mod_python.so appears to be installed in
> > > /usr/local/apache-ast/modules directory.
> > >
> > > >>>>
> > > /usr/local/apache-ast>ls -l modules/
> > > total 1738
> > > -rw-r--r--  1 root  wheel     8951 Jun 29 10:19 httpd.exp
> > > -rwxr-xr-x  1 root  wheel  1739997 Jun 29 10:50 mod_python.so
> > >
> > > >>>>
> > >
> > > Have also added the following lines in the config file -
> > > >>>>
> > > <Directory "/usr/local/apache-ast/htdocs">
> > >       AddHandler mod_python .py
> > >       PythonHandler mod_python.publisher
> > >       PythonDebug On
> > > </Directory>
> > >
> > > >>>>
> > >
> > > Any one knows if there is any bug with mod_python installation on
> FreeBSD 6.1. Please let me know in case you there is anything that is
> missing in the install steps.
> > >
>
> Have you installed apache, python and mod_python ALL from ports?  If
> not, make uninstall the lot and then install it via ports.  I've got
> mod_python installed on FreeBSD 5.x -> 6.2 all with out issue and
> without any fiddling.  Just install apache2 and python from ports,
> then build mod_python from ports.  If you installed apache2 from a
> tar-ball then that is most likely the source of your problems.
>
> -Jeff
>
>


More information about the Mod_python mailing list