2

I am having problems adding postgis to my database. I'm following the instructions from here: http://postgis.net/docs/postgis_installation.html#idp32328352 (That said, I have combined some previous instructions from multiple blogs/advices.)

After creating my sample gis db, this is what I'm seeing:

/c gis gis=# CREATE EXTENSION postgis; ERROR: PostGIS is already installed in schema 'public', uninstall it first gis=# CREATE EXTENSION postgis_topology; ERROR: required extension "postgis" is not installed gis=# CREATE EXTENSION postgis_tiger_geocoder; ERROR: required extension "postgis" is not installed

I think that I may have originally done a CREATE EXTENSION postgis; on the postgres database. I'm not sure. I have tried DROP EXTENSION postgis; on postgres, but that returns: ERROR: extension "postgis" does not exist.

I have gone so far as to purge postgres and related packages, then reinstalled it. (Though it seemed to still find the gis db after reinstalling -so I'm not sure it was thorough.) Am I misunderstanding the message that postgis is installed in schema public? The sites I have read have advised to install it separately on each gis-enabled DB.

Add'l information: SELECT version(); Returns: PostgreSQL 9.4.4 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2, 64-bit And: SELECT postgis_full_version(); Returns: POSTGIS="2.1.8 r13780" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" LIBXML="2.9.1" LIBJSON="UNKNOWN" This is a development setup.

  • Since you're using PostgreSQL 9.4,4 and Postgis 2.1.8, you may have to drop and create the database again, using only CREATE EXTENSION postgis;. Here's more on this. – pierrebonbon Nov 8 '18 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.