3
votes

I want to install PostGIS 2.3 with PostgreSQL 9.6 on a Ubuntu xenial 16.04 with:

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt trusty-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

Then install postgis:

sudo apt-get install postgresql-9.6-postgis-2.3

But this returns:

The following packages have unmet dependencies:

postgis : Depends: libgdal1h (>= 1.9.0) but it is not installable
          Depends: libgeos-c1 (>= 3.4.2) but it is not installable
          Depends: liblwgeom-2.3-0 (>= 2.0.0) but it is not going to be installed
1
Yep, I also ran into some conflicts like this when upgrading and had to uninstall some other stuff to get this working. Please try sudo aptitude install instead of apt-get install that gives you more options. I chose to uninstall some stuff and put in postgis.e4c5
I get the same results using aptitude, can you be more specific on your approach?Joost Döbken
aptitude shows you what the conflicts are and asks you how you wish to handle them.e4c5
Keep the following packages at their current version: 1) liblwgeom-2.3-0 [Not Installed] 2) postgresql-9.6-postgis-2.3 [Not Installed]Joost Döbken
surely it would have given you another optione4c5

1 Answers

0
votes

I know it's a bit later but for those who get this problem, try setting xenial-pgdg instead of trusty-pgdg when using 16.04

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt xenial-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