我想在Ubuntu xenial 16.04上安装带有PostgreSQL 9.6的PostGIS 2.3,其中包括:
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
然后安装postgis:
sudo apt-get install postgresql-9.6-postgis-2.3
但这回归:
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
我知道它有点晚了但是对于那些遇到这个问题的人,在使用16.04时尝试设置xenial-pgdg而不是trusty-pgdg
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