GeoDjango Dependencies with Apt-get on Ubuntu

The GeoDjangoInstall wiki describes in detail how to install GeoDjango dependencies from source, which for many reasons is a great approach.

However, with the recent Ubuntu releases you can also use the Synaptic Package Manager (apt-get install on the command line) to handle the installation work for you.

Note: if you take this route, be advised that the location of install directories will differ significantly from the source install approach. ie. PostGIS will be installed inside the PostgreSQL contrib and share directories specific to the PostgreSQL version number.

This writeup is based on Ubuntu 7.10. Any readers should update for other versions.

Then make sure that the postgresql programs are on your path or in .bash_profile

Export PATH=/usr/lib/postgresql/8.3/bin/

Open up access in the pg_hba.conf file

sudo vim /etc/postgresql/8.3/main/pg_hba.conf
# change ident sameuser to trust - WARNING SECURITY RISK
# comment out this line to allow, for instance, to django/psycopg2 to connect without password
local all postgres ident sameuser