Installing GeoDjango Dependencies with Homebrew

Homebrew seems to be the hot new package manager for OS X, so while setting up a new system last night, I figured I’d see how it handled installing all the external libraries required for GeoDjango. The answer I quickly found out was, “extremely well.” Here are the steps:

$ brew update # make sure all your formulae are up to date
$ brew install postgis # this will handle installing postgres, geos, proj4, and postgis
$ brew install gdal

That’s it. Three (two if you don’t count the update) steps to GeoDjango goodness. Color me impressed.

Comments

  • May 7, 2010 at 7:44 a.m. #
    Richard Bronosky mentioned:

    1 step if you don’t count the update and do both formulas in one install:
    brew install postgis gdal

  • May 7, 2010 at 8:52 a.m. #
    Peter Baumgartner mentioned:

    Ha! Even better. Thanks Richard.

  • May 7, 2010 at 10:57 a.m. #
    Masklinn responded:

    So… same as macports, except it’s probably easier to create new formulas than to create new ports?

  • May 7, 2010 at 1:48 p.m. #
    Simon responded:

    surely you still must wrestle with postgresql PGDATA path, pg_config, pg_hba.conf, spatial db template, postgres users, environment paths for GDAL and GEOS, dated libraries to upgrade like libxml2….

  • May 7, 2010 at 3:35 p.m. #
    Peter Baumgartner added:

    Simon, the only thing I had to do was to create a spatial database template and create the initial application database and I was up and running with a GeoDjango site on a fresh Snow Leopard install. No issues with environment paths, dated libraries, etc.

    I don’t exactly remember now, but I believe I was prompted on the Postgres install to setup my local user as a Postgres superuser using ident authentication, so I never need to deal with creating new Postgres users.

  • May 7, 2010 at 4:03 p.m. #
    simon chimed in with:

    clean and up to date installs, starting from scratch, will always help. i’ve installed geo 3 times now on different archs and it has never been straight forward. something conflicts or is on an unexpected path. but if brew does it right, then okay, I’ll try it next time asked.

    How does brew install packages? I prefer traditional installs like /usr/local/libl/pgsql/... rather than /Library/PostgresSql/8.4/sh…..

  • May 7, 2010 at 9:57 p.m. #
    Adam Vandenberg responded:

    @simon: Homebrew will compile to ”/usr/local/Cellar/postgresql/8.4/...” and then link bin, lib, include, and so on from that location into /usr/local/bin, lib, include, and so on.

    So the software packages live separated in the “Cellar” and are symlinked into /usr/local, which is known as the “prefix”.

  • May 18, 2010 at 8:54 a.m. #
    Rob Hudson piped up:

    I contributed the original postgis homebrew recipe. It’s neat to do a `git log -p` on it to see all the other people that have carried it forward since my initial stab at it.

Got something to say?





Our Products

Gondola
Gondola is a hosted CMS that gives designers a powerful and easy platform to create amazing geo-enabled Websites.
Trailmapping
Still in development, Trailmapping is a GPS enabled trail guide and trip logger.

Categories

Archives

Elsewhere

What we’ve been up to online

Interested in working with us?
Fill out the form below or contact us at:

PO Box 774441
Steamboat Springs, CO
80477

ph: 970.879.8810
fx:  970.367.8596
info@lincolnloop.com