Dependency issues while installing postgresql-10-postgis-2.5 on Ubuntu Xenial (16.04)

660 views Asked by At

There are some dependency problems while installing postgresql-10-postgis-2.5 on Ubuntu Xenial (16.04) after 2.5.3 version (which is published to PostgreSQL Apt Repo a couple days ago). The reason is that now postgresql-10-postgis-2.5 (version 2.5.3+dfsg-2.pgdg16.04+1) requires libgeos-c1v5 (>= 3.7.0) but the latest version of libgeos-c1v5 is 3.5.0-1ubuntu2 for Ubuntu Xenial (https://packages.ubuntu.com/search?keywords=libgeos-c1v5). I can upgrade to bionic (18.04 LTS) but the same problem exists since it brings version 3.6.2. 19.04 is not an option for me at the moment.

Is there a way to install libgeos-c1v5 >= 3.7.0 or install postgresql-10-postgis-2.5 2.5.2 on Ubuntu Xenial (16.04) using apt?

The steps to reproduce it locally on a Docker container:

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.
1

There are 1 answers

0
Vignesh On

We faced similar issue with Ubuntu 18 when trying to install postgresql-9.6-postgis-2.5. We had to install the experimental version 3.7 to get it working.

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

However, I'm not sure if you can get this for xenial.

Hope this helps, thanks.

Update: We now have the updated version of libgeos in bionic repo, hope the updated version was released for xenial as well, thanks.

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