I thought I'd chime in.

Running CentOS 5.2 on a 64-bit machine, responds with a very similar
error as the original poster, but run fine if run on a 32-bit machine
OR from runserver.

At one point I even went and got the latest libffi, but it appears
python doesn't use it anyway... (Some python search I found, someone
complained that the 'internal copy' of libffi in the src tarball was
very old, and shortly after that the config file was set to use the
system installed libffi.)

All the geo and django items were installed from scratch. (see below
for versions and options)
I tried both python 2.5 and 2.6... no go
I tried mod_wsgi and mod_python... no go

Apache is running pre-fork in both cases.

Bill

I have some fairly good instructions as to what I did:
(Note... these very instructions work on a 32-bit machine... but not a
64-bit machine.)

% yum install gcc-c++ zlib-devel
% yum install subversion
- optional
% yum install swig curl
Install Python 2.5.2 or 2.6 from src

% yum install readline-devel
% cd /usr/local/Python-2.x
% ./configure --with-threads --enable-shared
% make
% make install
% cat "/usr/local/lib" >> /etc/ld.so.conf
% ldconfig -N

- install others...
% yum install http
% yum install httpd-devel
% yum install apr-devel

- install mod_wsgi
% cd /usr/local/lib/python2.5/config
% ln -s ../../libpython2.5.so .
% ./configure
% make
% make install

Install Postgres from src

% yum install flex bison bison-devel

% cd /usr/local/postgresql-8.3.4
% ./configure
% make
% make install

% echo /usr/local/postgresql-8.3.4/lib/ > /etc/ld.so.conf.d/pgsql.conf
% echo "PATH:$PATH:/usr/local/pgsql/bin >> ~/.bash_profile
% . ~/.bash_profile
% ldconfig -N

% useradd -c "PostgreSQL User" -m -d /var/lib/pgsql postgres
% mkdir /var/lib/pgsql/data
% chown postgres /var/lib/pgsql/data
% chmod og-rwx /var/lib/pgsql/data

% su - postgres
% echo "PATH:$PATH:/usr/local/pgsql/bin >> ~/.bash_profile
% . .bash_profile
% /usr/local/pgsql/bin/initdb -D /var/lib/pgsql/data

% cp /usr/local/src/postgres_startup_script /etc/init.d/postgres
% cd /etc/rc2.d/
% ln -s ../init.d/postgres S75postgres
% ln -s ../init.d/postgres K75postgres
% cd /etc/rc3.d/
% ln -s ../init.d/postgres S75postgres
% ln -s ../init.d/postgres K75postgres

% echo "/usr/local/pgsql/lib" > /etc/ld.so.conf.d/postgres.conf
% ldconfig -N

- install psycopg2 (postgres python package)
-- add /usr/local/pgsql/bin to root's PATH var
-- may need to edit setup.cfg to add pgsql/include path
% python setup.py build
% python setup.py install


Install GIS from source

% cd /usr/local/src/geos-3.0.2
% ./configure
% make
% make install

% ldconfig -N

% cd /usr/local/src/proj-4.6.1
% ./configure
% make
% make install

% cd /usr/local/src/postgis-1.3.3
% ./configure
% make
% make install

% cd /usr/local/src/gdal-1.5.2
% ./configure
% make
% make install
--- Optional installs:

Install libiconv, then re-install gettext
% yum install gettext gperf autoconf automake ncurses-devel
% cd /usr/local/src/libiconv-1.12
% ./configure
% make
% make install
% cd /usr/local/src/gettext-0.17
% ./configure
% make
% make install

Apache /etc/httpd/conf.d/roadflaw.conf file:

LoadModule wsgi_module modules/mod_wsgi.so

SetEnv PYTHONPATH '/home/django-svn-trunk:/home/roadflaw'
SetEnv GDAL_DATA '/usr/local/share/gdal'

# replace the keywords 'site', 'user', 'group' with your details
ServerName roadflaw.pugetworks.com

WSGIScriptAlias / /home/roadflaw/wsgi.py
WSGIDaemonProcess apache user=apache group=apache processes=5
threads=5
WSGIProcessGroup apache
WSGISocketPrefix run/wsgi

Alias /admin_media /home/django-svn-trunk/django/contrib/admin/media

<Location /admin_media>
  Order allow,deny
  Allow from all
</Location>

Alias /media /home/roadflaw/media

<Location /media>
  Order allow,deny
  Allow from all
</Location>

Apache /etc/httpd/conf.d/wsgi.py file:

import sys
import os

sys.path.append( os.path.dirname( os.path.abspath(__file__) ) )
sys.path.append( os.path.dirname( '/home/roadflaw' ) )
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to