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 http://download.osgeo.org/geos/geos-3.0.0.tar.bz2
$ 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: http://bugs.gentoo.org/attachment.cgi?id=149838&action=view (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 manage.py 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.
(InteractiveConsole)
>>> 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/__init__.py", line 340, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libgeos_c.so.1: 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/ld.so.conf.d/local-lib.conf
ldconfig
Last modified 15 years ago Last modified on Dec 10, 2008, 5:24:22 PM
Note: See TracWiki for help on using the wiki.
Back to Top