[Tutor] Re: Help with 500 error on cgi script

Sheila King sheila@thinkspot.net
Mon, 19 Mar 2001 12:20:32 -0800


First of all, I want to thank everyone for all their help. It seems that this
is heading toward a solution, and I couldn't have gotten there without you,
especially D-Man and Michael Reilly.

On Mon, 19 Mar 2001 13:54:54 -0500 (EST), "Michael P. Reilly"
<arcege@shore.net>  wrote about Re: [Tutor] Re: Help with 500 error on cgi
script:

:Did you build your copy of Python with the proper directory? Looking at
:your past output:
:: Could not find platform independant libraries <prefix>
:: Could not find platform dependant libraries <exec_prefix>
:: Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
:
:This sounds like two things, that first you did not do "make install"
:but are running Python out of the build/distribution directory (I've
:had this problem myself when I was testing out 2.0 with my scripts).

No, I believe I did do "make install".

:And the second, based on the info above, you did not change the install
:prefix and Python thinks is should be looking in /usr/local/...;

Well, I plead guilty to that. I think I did the impatient install, where I did
not try to configure anything, but just typed "make install", and was done
with it. Still, at the point in time that I installed this, I don't think I
would even have known how to configure the paths or what they should have
been. (Is it obvious that I'm no Unix maven ?? Nah, of course not.)

: you
:will want to reconfigure with "--prefix=/big/dom/xthinkspot" and
:install Python in /big/dom/xthinkspot/bin/python, with the libraries in
:/big/dom/xthinkspot/lib/python2.0.

Great. I will have to do that. Later. I guess I will have to temporarily
disable or pause all the scripts that I have running on my site that are using
Python. Then remove/uninstall my current copy. Then reinstall in the correct
place.

Any tips on uninstalling? I have all the files in the
/big/dom/xthinkspot/Python-2.0 director and its subdirectories. Can I simply
delete that?

:Then when you install to cut down on how much is copied, run:
:  make bininstall libinstall sharedinstall
:or if you want the executable to be "python2.0" instead, use
:"altbininstall" instead of "bininstall".
:
:You may even want to think about making a more "diskspace-friendly"
:build for yourself.  Run configure with:
:  LDFLAGS=-s CFLAGS=-O3 ./configure --prefix=...
:(make optimized code and strip executables; if -O3 breaks things, try
:-O2 instead).  You could even get rid of the .pyo files afterward since
:most ppl don't use the -O option to python.

Thanks for the tips.

:There is nothing wrong with GCC 2.7.2.
...<snipped>...

:
:PS: I just reconfigured Python 2.0 on my FreeBSD 3.x box with:
:  $ LDFLAGS=-s CFLAGS=-O3 ./configure --without-threads --prefix=$HOME
:  $ make all altbininstall libinstall sharedinstall
:  $ cd /tmp #must be in different directory
:  $ $HOME/bin/python2.0 -c 'import test.autotest'
:  [507]golem> $HOME/bin/python2.0
:  Python 2.0 (#2, Mar 19 2001, 13:28:45)
:  [GCC 2.7.2.1] on freebsd3
:  Type "copyright", "credits" or "license" for more information.
:  >>>
:
:I got the standard number of tests stats (80 OK, 1 failed (largefile),
:26 skipped).

Question, about the above snippets:
what does the --without-threads option do? Do I want that?

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/