These instructions apply for Fedora 9 and GeoDjango on django1.0 and mysql 5.0.51. These are the problems I ran into trying to get GeoDjango running

Third Party Library Installation

Download and untar the geos lib

$ wget
$ tar xjf geos-3.0.0.tar.bz2

Next, change into the directory where GEOS was unpacked, run the configure script and attempt to run the make script

$ ./configure
$ make

If make fails, I think it's due to gcc 4.3.0 not liking the includes for some of the files. You can download the latest svn drop (3.1.0) and that should compile OR you can make the changes in the 3.0.0 source code by following the diff's on this page: (i.e. add the lines starting with a '+' and remove the lines starting with a '-' from the respective file)

Once you have made it successfully, install it

# make install

Install PROJ.4 and GDAL according to the main installation page

Test that the GEOS libraries are where they should be by changing to a django project directory and importing the models from django.contrib.gis.db

$ python shell
Python 2.5.1 (r251:54863, Jun 15 2008, 18:24:56) 
[GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.contrib.gis.db import models

If you get no errors, it's all good! If you get this (at the bottom of the stack trace)

  File "/usr/lib64/python2.5/ctypes/", line 340, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: cannot open shared object file: No such file or directory

Add /usr/local/lib to the dynamic linker run-time bindings

echo '/usr/local/lib' >> /etc/
Last modified 7 years ago Last modified on 12/10/08 17:24:22
Back to Top