我想在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
sudo aptitude install
而不是apt-get install
,这会给你更多的选项。我选择卸载一些东西并安装 postgis。 - e4c5aptitude
得到了相同的结果,你能具体说明一下你的方法吗? - Joost Döbken