Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run a postgis sql script and I'm running into the following error. Am I correct to say that updating my server version will fix it? If so, how can I go about updating it?

I'm on Mac OSX Lion and installed Postgres via brew. Apparently I have an older version installed which is 9.1.2 but installing postgis installed postgres 9.2.1 on to my system. How can I point my postgres server to the new one?

nai@nyc /usr/local/share/postgis (git::master) $ psql -d template_postgis -f postgis.sql
psql:postgis.sql:49: ERROR:  incompatible library "/usr/local/Cellar/postgresql/9.2.1/lib/": version mismatch
DETAIL:  Server is version 9.1, library is version 9.2.

nai@nyc /usr/local/share/postgis (git::master) $ psql
psql (9.2.1, server 9.1.2)
WARNING: psql version 9.2, server version 9.1.
         Some psql features might not work.
share|improve this question

My fix:

brew uninstall postgresql --force

I had previous versions of postgres floating around.

brew uninstall postgis

brew install postgis

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.