Thoughts on data, statistics, computer science, and those other things people call life.

Menu

Why I love my DBAs; or How Not to Install PostGIS on a Mac

This summer, I had the good fortune of having people tirelessly laboring to ensure the servers I used to host my databases were in working order and able to execute the tasks I needed them to run. I didn’t realize how much that meant until I had to do it myself. I’ve been putting together some examples as part of my series on Census Bureau Demographic Data for Developers. I used PostgreSQL databases loaded with PostGIS at work every day and hadn’t taken the time to install it on my computers. No longer having access to them, I had to go through the process of doing it myself.

While brew install postgis may seem like an easy thing to do, in the case of PostGIS, I also had trouble getting things working. I don’t blame Homebrew, but on the some problems with my Python installation.

Even if I had got it to install correctly with Homebrew, I would still recommend using Postgres.app. Click, download, unzip, move to the Applications folder, click the icon, and you’re literally off and running with both PostgreSQL and PostGIS. I was a little annoyed that when I created a database, I had to run CREATE EXTENSION postgis;, but it’s a minor annoyance. After literally a week of trying to set up PostGIS, the ease of Postgres.app is wonderful.

And uninstall your previous version of Postgres.app if you’re upgrading. I got an unpleasant error "ERROR: could not access file "$libdir/postgis-2.0": No such file or directory", which really just meant I hadn’t removed the old version like I should have. Removing the old and new installations, and then reinstalling the new version fixed this problem and now I’m up and running with PostGIS.

And thank your DBA next time you see them. You have no idea how many little annoying tasks they have to deal with on a daily basis just to keep things running. They deserve your appreciation.