0

postgresql-10-postgis-2.5在 2.5.3 版本(几天前发布到 PostgreSQL Apt Repo)之后在 Ubuntu Xenial (16.04) 上安装时存在一些依赖性问题。原因是现在postgresql-10-postgis-2.5(版本2.5.3+dfsg-2.pgdg16.04+1)需要libgeos-c1v5 (>= 3.7.0)但最新版本libgeos-c1v53.5.0-1ubuntu2用于 Ubuntu Xenial(https://packages.ubuntu.com/search?keywords=libgeos-c1v5)。我可以升级到仿生(18.04 LTS),但同样的问题存在,因为它带来了 3.6.2 版本。19.04目前对我来说不是一个选择。

有没有办法使用 Ubuntu Xenial (16.04)安装libgeos-c1v5 >= 3.7.0或安装?postgresql-10-postgis-2.5 2.5.2apt

在 Docker 容器上本地重现它的步骤:

docker run -it ubuntu:xenial /bin/bash

apt update
apt install -y curl

echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" > /etc/apt/sources.list.d/pgdg.list
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

apt update
apt install postgresql-10-postgis-2.5 postgresql-10-postgis-2.5-scripts
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 postgresql-10-postgis-2.5 : Depends: libgeos-c1v5 (>= 3.7.0) but 3.5.0-1ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.
4

1 回答 1

1

在尝试安装 postgresql-9.6-postgis-2.5 时,我们在 Ubuntu 18 上遇到了类似的问题。我们必须安装实验版本 3.7 才能使其正常工作。

libgeos-3.7.0_3.7.0-1_bionic0_amd64 libgeos-c1v5_3.7.0-1_bionic0_amd64.deb

https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-experimental/+build/15675841

但是,我不确定您是否可以将其用于 xenial。

希望这会有所帮助,谢谢。

更新:我们现在在仿生 repo 中有更新版本的 libgeos,希望更新版本也可以为 xenial 发布,谢谢。

apt search libgeos-3.7
Sorting... Done
Full Text Search... Done
libgeos-3.7.1/bionic-pgdg 3.7.1-1~pgdg18.04+1 amd64
  Geometry engine for Geographic Information Systems - C++ Library

libgeos-3.7.1-dbgsym/bionic-pgdg 3.7.1-1~pgdg18.04+1 amd64
  debug symbols for libgeos-3.7.1
于 2019-10-21T00:48:52.987 回答