Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have downlaoded the OSGEO-Live 6.0 virtual machine running Linux Xubuntu. I have it running through VirtualBox on a Windows machine. It currently comes preinstalled with a lot of GIS software, including PostGIS 1.5. I would like to upgrade PostGIS to 2.x.

Having not used linux much, what is the best method to upgrade PostGIS from 1.5 to 2.x on the Xubuntu virtual machine? Since I just downloaded the Live-DVD, we can assume there is no data that needs to be retained.

share|improve this question
    
useful link - gis.stackexchange.com/questions/28933/… –  Mapperz Sep 6 '12 at 16:03
    
Would advise using ubuntu clean VirtualBox and use this guide for PostGIS - linfiniti.com/2012/05/installing-postgis-2-0-on-ubuntu have been using this for a good few months without issue. –  Mapperz Sep 6 '12 at 16:05

1 Answer 1

up vote 3 down vote accepted

Following the instructions from Installing PostGIS 2.0 on ubuntu on linfiniti.com:

1)

  • sudo apt-add-repository ppa:sharpie/for-science # To get GEOS 3.3.2

  • sudo apt-add-repository ppa:sharpie/postgis-nightly

  • sudo apt-get update

  • sudo apt-get install postgresql-9.1-postgis

2) create a new database.

3) create postgis extension: CREATE EXTENSION postgis;

4) confirm the version: select postgis_full_version();

should be something like:

"POSTGIS="2.0.1 r9979" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" RASTER"

share|improve this answer
    
So I did a select version() and it said the OSGEO Live DVD 6.0 is running postgresql 9.1.5. Running select postgis_full_version() says it is PostGIS 1.5.3. After creating a new DB, then CREATE EXTENSION postgis, I got ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/postgis.control": No such file or directory. Thoughts? –  RyanDalton Nov 3 '12 at 4:49
    
This post to the postgis user list suggests I would need to build PostGIS 2.0 from source... –  RyanDalton Nov 3 '12 at 4:54
    
Strange... I do the same. Do you have postgis-2.0 folder ? /usr/share/postgresql/9.1/contrib/postgis-2.0 –  leoze oze Nov 3 '12 at 12:39
    
nope, just ../postgis-1.5. Did you install postgis-2.0 after you downloaded the VM? –  RyanDalton Nov 3 '12 at 14:12
1  
I guess I did (and forgot!) using this: linfiniti.com/2012/05/installing-postgis-2-0-on-ubuntu –  leoze oze Nov 5 '12 at 9:31

Your Answer

 
discard

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.