在 Ubuntu 14.04 上安装 Postgis 扩展的问题

gre*_*sov 6 postgresql ubuntu postgis postgresql-9.3

我有带有 Postgres 9.3 的 Ubuntu 14.04,我正在尝试安装 Postgis 扩展。我发现的最推荐和最直接的方法之一非常简单:

sudo apt-get install postgresql-contrib postgis postgresql-9.3-postgis-2.1
Run Code Online (Sandbox Code Playgroud)

但是,这会引发“未满足的依赖项”错误:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
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 going to be installed
    Depends: liblwgeom-2.1.3 (>= 2.0.0) but it is not going to be installed

postgresql-9.3-postgis-2.1 : Depends: libgdal1h (>= 1.9.0) but it is not installable
    Depends: libgeos-c1 (>= 3.4.2) but it is not going to be installed
    Depends: liblwgeom-2.1.3 (>= 2.1.2) but it is not going to be installed
    Depends: libproj0 (>= 4.8.0-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)

我看到很多人遇到这个问题,但还没有找到好的解决方案。

到目前为止,我找到的最接近的问题/答案是this one,但是它涉及 Ubuntu 12.04,所以我觉得我的问题不是重复的。

小智 3

正如我们在这里看到的,所有必需的包都在官方存储库中正确更新。要解决该问题,您可以在这里找到一个好的起点。