-1

I am trying to work with PostgreSql 9.3, Postgis 2.1.3 and Pgrouting 2.0.0 versions in Ubuntu (VPS). I have installed PostgreSql 9.3,but when i run CREATE EXTENSION postgis SCHEMA public VERSION "2.0.0"; in PgAdmin3 i get ERROR: could not stat file "/usr/share/postgresql/9.3/extension/postgis--2.1.3.sql": No such file or directory and same error with Pgrouting 2.0.0.Are these versions compatibles running in that system?,in localhost work fine.

Cœur
  • 37,241
  • 25
  • 195
  • 267
user19566
  • 153
  • 1
  • 12
  • Yes, this should work. What repository did you install from or did you compile from source? – Stephen Woodbridge Mar 05 '16 at 23:43
  • Thanks for your comment. I am new in ubuntu and i don't know exactly how to install postgis and the extensions using repositories. Should i edit the pg_config file in postgresql?. – user19566 Mar 06 '16 at 16:20

1 Answers1

1
sudo apt-get update
sudo apt-get install postgresql-9.3 postgresql-9.3-postgis-2.1 postgresql-9.3-postgis-scripts postgresql-contrib-9.3 postgresql-client-common postgresql-common postgresql-server-dev-9.3 postgresql-client-9.3

This should install everything and start the server. Read the following man pages. to create a user and a database.

man createuser
man createdb 

and this will install postgis into database 'mydatabase' for user 'user':

psql -U user mydatabase -c "create extension postgis"
Stephen Woodbridge
  • 1,100
  • 1
  • 8
  • 16