4

I stumbled upon this error while using QGIS (2.18.13) to display a PostGIS raster and read in comment #14 on the same issue, that it is working when using a newer GDAL version.

I have GDAL 1.11.3 used by the DB, which I installed using this instruction (PostgreSQL 9.6.5 & PostGIS 2.3.3). I am curious, if anyone has a PostGIS package for Ubuntu 16.04 compiled against a newer GDAL version. Or do I need to compile it from scratch?

4

The Ubuntu GIS team has GDAL 2.2.1 for Xenial and has PostGIS 2.3.3 compiled against it. From the PostGIS build logs

checking for gdal-config... /usr/bin/gdal-config
checking GDAL version... 2.1.3

Install with

sudo add-apt-repository ppa:ubuntugis/ppa;
sudo apt-get update;
sudo apt-get install postgis;

EDIT by OP:

I have tried ubuntugis before and it didn't work, because I used the newest PostgreSQL version (9.6) from the Postgresql repository, but as it turns out, the current ubuntugis-unstable PostGIS version is compiled against PostgreSQL 9.5. So I removed the Postgresql repository from my sources.list and did:

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update  
sudo apt-get install postgresql-9.5
sudo apt-get install postgresql-9.5-postgis-2.3 postgresql-contrib-9.5 postgresql-9.5-postgis-scripts
sudo apt-get install postgis

That did the trick for me, just to give a little more context.

  • 1
    There may be newer versions in the unstable: launchpad.net/~ubuntugis/+archive/ubuntu/… – user30184 Sep 28 '17 at 19:30
  • @user30184 I didn't even see that, I blame Launchpad's interface, I didn't realize the package list was paged. Yuck. – Evan Carroll Sep 28 '17 at 19:37
  • @EvanCarroll please update the link and install part of your answer to the unstable ppa. – AndreJ Sep 29 '17 at 5:52
  • @AndreJ why? the one I linked is the one I cited in my answer from the Ubuntu GIS ppa. – Evan Carroll Sep 29 '17 at 14:47
  • Yep, that makes 100% more sense. – Evan Carroll Sep 29 '17 at 15:14

Your Answer

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

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