Postgresql

在 Ubuntu 14.04 上安裝 Postgis 擴展時出現問題

  • August 11, 2014

我有 Ubuntu 14.04 和 Postgres 9.3,我正在嘗試安裝 Postgis 擴展。我發現的最推薦和最直接的方法之一非常簡單:

sudo apt-get install postgresql-contrib postgis postgresql-9.3-postgis-2.1

但是,這會引發“未滿足的依賴項”錯誤:

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.

我見過很多人遇到這個問題,但還沒有找到好的解決方案。

到目前為止,我發現的最接近的問題/答案是this one,但是它處理的是 Ubuntu 12.04,所以我覺得我的問題不是重複的。

正如我們在這裡看到的,所有必需的包都在官方儲存庫中正確更新。要解決這個問題,您可以在這裡找到一個好的起點。

引用自:https://dba.stackexchange.com/questions/72863