在Ubuntu 16.04 Xenial上安装PostGIS

问题描述 投票:3回答:1

我想在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
postgresql postgis ubuntu-16.04
1个回答
0
投票

我知道它有点晚了但是对于那些遇到这个问题的人,在使用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
© www.soinside.com 2019 - 2024. All rights reserved.