2

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.

2

1 Answer 1

3

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"

6
  • 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? Nov 3, 2012 at 4:49
  • This post to the postgis user list suggests I would need to build PostGIS 2.0 from source... Nov 3, 2012 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, 2012 at 12:39
  • nope, just ../postgis-1.5. Did you install postgis-2.0 after you downloaded the VM? Nov 3, 2012 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, 2012 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.