Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 am attempting to dump/restore a database between servers. Here is what I have tried is


pg_dump -h localhost -U user database > dump.sql

Restore Onto other server:

createdb -h localhost -U postgres -T template0 database
psql -d database -U postgres -h localhost -f dump.sql

psql:rocdocs.sql:35: ERROR:  could not access file "/usr/lib/postgresql/8.3/lib/liblwgeom": No such file or directory
psql:rocdocs.sql:38: ERROR:  function public.st_box2d_in(cstring) does not exist
psql:rocdocs.sql:46: ERROR:  could not access file "/usr/lib/postgresql/8.3/lib/liblwgeom": No such file or directory
psql:rocdocs.sql:49: ERROR:  function public.st_box2d_out(box2d) does not exist
psql:rocdocs.sql:61: ERROR:  function st_box2d_in(cstring) does not exist

... ...

share|improve this question
up vote 1 down vote accepted

This error is caused by lack of PostGIS shared libraries.

In general, to guarantee successful restore, you should have installed all the same extensions/contrib modules/addons/extras, which were installed in the primary server. This will guarantee that all shared libraries are in place.

Install PostGIS (same version) in the server, and retry.


PS. You did not specify your PostgreSQL / PostGIS version, this is needed if you need more help.

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.