views:

698

answers:

2

I'm trying to get my dev environment back up and running after upgrading to Snow Leopard. In particular, I need postgresql and postgis working, but I'm running into the following problem.

After installing both with the following:

sudo port install postgresql84 postgresql84-server postgis

I get errors like the following when I try to load my sql database, which has references to liblwgeom.so

ERROR:  function public.box3d_in(cstring) does not exist
ERROR:  incompatible library "/usr/local/pgsql/lib/liblwgeom.so": version mismatch
DETAIL:  Server is version 8.4, library is version 8.3.

That file does exist on my computer, but must be sitting around from an old install of postgresql 8.3. The problem is I can't figure out where liblwgeom.so is supposed to come from. It's not included in postgis 1.4, and a Google search is leaving me scratching my head. Any ideas?

+2  A: 

liblwgeom.so comes with PostGIS vesion 1.3. It has been renamed in 1.4. It looks like your dump is of a database with PostGIS 1.3 and you're trying to reload in PostGIS 1.4. This is not supported.

See the PostGIS manual on upgrading for details on what to do.

Magnus Hagander
That was exactly the problem, thanks for the help
Mike
+1  A: 

Update your ports:

sudo port selfupdate

Then install postgis 1.4, which will work for postgresql 8.4

sudo port install postgis