[mod_python] ./configure Py_NewInterpreter error & can't import permissions & gnu-gcc executable name

Graham Dumpleton graham.dumpleton at gmail.com
Thu May 31 20:15:58 EDT 2007


On 01/06/07, Berwyn Hoyt <berwyn at pharos.co.nz> wrote:
> Ah thanks, Graham.  That solved the Py_NewInterpreter error.
>
> There were a couple of other problems with make which I also had to
> solve.  I'll list them here in case you think any of them need to be
> addressed in the make script:
>
> # For make to work, I had to do this as for some reason
> i486-linux-gnu-gcc didn't exist.  I'm running debian sarge.
> ln -s /usr/bin/i486-linux-gnu-gcc-3.3 /usr/bin/i486-linux-gnu-gcc

That is some problem with your system nothing mod_python can do to fix that. :-)

> #these worked fine:
> make
> make install
>
> #Before I could import mod_python as a normal user, I had to do this:
> chmod ugo+rX  /usr/lib/python2.4/site-packages/mod_python -R
> chmod ugo+rwx /usr/lib/python2.4/site-packages/mod_python/*.py

The umask of the account you used to perform the build/installation is
probably too restrictive. A better umask for the account may be:

  umask 0022

BTW, you should not be giving o+w to the .py file as anyone could then
edit them. Not good considering that Apache when started as root
imports some of those modules as root. Ie., arbitrary person could add
in code which would then execute as root.

Graham

> Cheers,
> Berwyn
>
> Graham Dumpleton wrote:
> > Are you sure your have the python-dev 2.5 package installed. It is not
> > enough to have just the runtime package installed, you must have the
> > developer package installed as well.
> >
> > Graham
> >
> > On 31/05/07, Berwyn Hoyt <berwyn at brush.co.nz> wrote:
> >>
> >>  Howdy.
> >>
> >>  I'm having trouble building mod_python under debian python2.5 running
> >> ./configure.  I'm afraid my ./configure figuring-out skills aren't good
> >> enough to solve it.
> >>
> >>  It works fine under python2.4, but not with python2.5.  Below is the
> >> output
> >> from ./configure.  Thanks.
> >>
> >>  # ./configure
> >>  checking for gcc... gcc
> >>  checking for C compiler default output file name... a.out
> >>  checking whether the C compiler works... yes
> >>  checking whether we are cross compiling... no
> >>  checking for suffix of executables...
> >>  checking for suffix of object files... o
> >>  checking whether we are using the GNU C compiler... yes
> >>  checking whether gcc accepts -g... yes
> >>  checking for gcc option to accept ANSI C... none needed
> >>  checking for ar... ar
> >>  checking for a BSD-compatible install... /usr/bin/install -c
> >>  checking whether make sets $(MAKE)... yes
> >>  checking for main in -lm... yes
> >>  checking for an ANSI C-conforming const... yes
> >>  checking your blood pressure... a bit high, but we can proceed
> >>  configure: checking whether apxs is available...
> >>  checking for --with-apxs... no
> >>  checking for apxs in /usr/local/apache/sbin... no
> >>  checking for apxs in your PATH... checking for apxs... no
> >>  checking for apxs2 in your PATH... checking for apxs2... /usr/bin/apxs2
> >>  found /usr/bin/apxs2, we'll use this. Use --with-apxs to specify
> >> another.
> >>  checking Apache version... 2.2.3
> >>  checking for Apache libexec directory... /usr/lib/apache2/modules
> >>  checking for Apache include directory... -I/usr/include/apache2
> >>  checking for --with-python... no
> >>  checking for python... /usr/bin/python
> >>  checking Python version... 2.5
> >>  checking Python install prefix... /usr
> >>  checking checking where python libraries are installed...
> >> /usr/lib/python2.5
> >>  checking for Py_NewInterpreter in -lpython2.5... no
> >>  configure: error: Can not link to python
> >>
> >>
> >> --
> >>
> >>
> >> Berwyn Hoyt, Senior Hardware Engineer: berwyn at brush.co.nz
> >>  Ph: +64 3 359 2101; Mobile: +64 21 045 7830
> >>  Brush Technology: www.brush.co.nz
> >>
> >> _______________________________________________
> >> Mod_python mailing list
> >> Mod_python at modpython.org
> >> http://mailman.modpython.org/mailman/listinfo/mod_python
> >>
> >>
> >
>


More information about the Mod_python mailing list