I am using Ubuntu 14.04, Postgresql 9.6. Previously I had working version of Postgis 2.3 but after upgrading to 2.4 when I query something from database with geometry objects I get ERROR: could not access file "$libdir/postgis-2.4": No such file or directory
. If I make count(*)
on the same table, it works well. How to solve this problem?
1 Answer
Executed sudo apt-get install postgresql-9.6-postgis-2.4
. Had to remove
ubuntugis-ppa-trusty.list
and ubuntugis-ubuntugis-unstable-trusty.list
from /etc/apt/sources.list.d/
before installing unmet dependencies:
The following packages have unmet dependencies: postgresql-9.6-postgis-2.4 : Depends: libgdal1h (>= 1.9.0) but it is not going to be installed Depends: libgeos-c1 (>= 3.4.2) but it is not going to be installed Depends: liblwgeom-2.4-0 (>= 2.4.0~rc1) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
-
I recommend postgresql-10-postgis-2.4 with PostgreSQL v10
sudo apt install -y postgresql-10-postgis-2.4 && sudo service postgresql restart
– JonathanCommented May 29, 2020 at 16:04