1

My python application makes heavy use of the osgeo library. We're looking to upgrade from PostGIS 1.5 to PostGIS 2.1, and I'm having issues.

I'm installing packages from the Ubuntu GIS PPA.

Before, I would install the python-gdal Ubuntu package to install GDAL with a copy of the osgeo python library. I would also install postgresql-9.1-postgis. Now, installing postgresql-9.3-postgis-2.1 uninstalls python-gdal, and vice versa. They are incompatible with one another, since one requires libgdal1 and the other requires libgdal1h. I have found instructions to compile libgdal from source, specifying to include the osgeo python library, but I would prefer to use a package if possible.

Does anyone know of a way to have PostGIS 2.1 and the Python osgeo library installed together without having to compile from source?

2
  • What version of Ubuntu?
    – user2856
    Jun 9, 2014 at 5:13
  • Ubuntu 12.04 precise
    – Tanner
    Jun 9, 2014 at 16:07

1 Answer 1

1

I'm not sure I have the exact answer, but I fought with this one trying to get newer versions of PostGIS, GDAL, and MapServer working on on an Ubuntu 12.04 LTS server, and had identical problems with packages getting un-installed. My preference was also to stick with standard packages. The sequence that I followed to get things working is outlined here:

PostGIS Raster in MapServer

And more specifically from build notes:

sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install gdal-bin
sudo apt-get install libgdal1
sudo apt-get install libgdal1-dev
gdal-config --version

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list'
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install Postgresql-9.3-postgis postgresql-contrib

sudo apt-get install cgi-mapserver
sudo apt-get install mapserver-bin
/usr/lib/cgi-bin/mapserv -v

This was a useful reference: http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS21UbuntuPGSQL93Apt

Hope this helps, Brian.

Your Answer

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

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