sudo apt-get install postgresql-9.5-postgis-2.5
returns a series of errors:
The following packages have unmet dependencies: postgresql-9.5-postgis-2.5 : Depends: libgdal1i (>= 1.9.0) but it is not installable Depends: libjson-c2 (>= 0.11) but it is not installable Depends: liblwgeom-2.5-0 (>= 2.5.0~beta1) but it is not going to be installed Depends: libproj9 (>= 4.9.0) but it is not installable Depends: libsfcgal1 (>= 1.2.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
I had never encountered a
not installable exception to date so I ma not sure of consequences of different possible actions... Attempting lower versions leads to the same result. How can PostGIS get safely installed then?
An attempt was also made, making a fresh installation of a Ubuntu 18.04 VM [following these instructions]
The source of the error was in adding the repository to sources.list
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt xenial-pgdg main" >> /etc/apt/sources.list'
which should be for 18.04
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt bionic-pgdg main" >> /etc/apt/sources.list'
[to butter things up even more, and attempt was made with
bioni-pgdg main leading to its own set of errors]!