I am unable to create the PostGIS extension on new databases in Ubuntu 14.04:
$ psql pg_testing -c "create extension postgis"
ERROR: could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1.so": /usr/lib/liblwgeom-2.1.3.so: undefined symbol: GEOSDelaunayTriangulation
All the software was installed from the Postgres repositories:
$ dpkg -l | grep postgres
ii libpostgresql-jdbc-java 9.2-1002-1 all Java database (JDBC) driver for PostgreSQL
ii pgdg-keyring 2013.2 all keyring for apt.postgresql.org
ii postgresql 9.3+154.pgdg14.04+1 all object-relational SQL database (supported version)
ii postgresql-9.3 9.3.4-1.pgdg14.04+1 amd64 object-relational SQL database, version 9.3 server
ii postgresql-9.3-dbg 9.3.4-1.pgdg14.04+1 amd64 debug symbols for postgresql-9.3
ii postgresql-9.3-postgis-2.1 2.1.3+dfsg-3.pgdg14.04+2 amd64 Geographic objects support for PostgreSQL 9.3
ii postgresql-9.3-postgis-scripts 2.1.3+dfsg-3.pgdg14.04+2 all Geographic objects support for PostgreSQL 9.3 -- scripts
ii postgresql-client 9.3+154.pgdg14.04+1 all front-end programs for PostgreSQL (supported version)
ii postgresql-client-9.1 9.1.13-1.pgdg14.04+1 amd64 front-end programs for PostgreSQL 9.1
ii postgresql-client-9.3 9.3.4-1.pgdg14.04+1 amd64 front-end programs for PostgreSQL 9.3
ii postgresql-client-common 154.pgdg14.04+1 all manager for multiple PostgreSQL client versions
ii postgresql-common 154.pgdg14.04+1 all PostgreSQL database-cluster manager
ii postgresql-contrib 9.3+154.pgdg14.04+1 all additional facilities for PostgreSQL (supported version)
ii postgresql-contrib-9.3 9.3.4-1.pgdg14.04+1 amd64 additional facilities for PostgreSQL
ii postgresql-server-dev-9.3 9.3.4-1.pgdg14.04+1 amd64 development files for PostgreSQL 9.3 server-side programming
$ apt-cache policy postgresql-9.3
postgresql-9.3:
Installed: 9.3.4-1.pgdg14.04+1
Candidate: 9.3.4-1.pgdg14.04+1
Version table:
*** 9.3.4-1.pgdg14.04+1 0
500 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main amd64 Packages
100 /var/lib/dpkg/status
9.3.4-1 0
500 http://de.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
$ apt-cache policy postgresql-9.3-postgis-2.1
postgresql-9.3-postgis-2.1:
Installed: 2.1.3+dfsg-3.pgdg14.04+2
Candidate: 2.1.3+dfsg-3.pgdg14.04+2
Version table:
*** 2.1.3+dfsg-3.pgdg14.04+2 0
500 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main amd64 Packages
100 /var/lib/dpkg/status
2.1.2+dfsg-2 0
500 http://de.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
And regarding GEOS:
$ dpkg -l | grep libgeos
ii libgeos-3.4.2 3.4.2-4ubuntu1 amd64 Geometry engine for Geographic Information Systems - C++ Library
ii libgeos-c1 3.4.2-4ubuntu1 amd64 Geometry engine for Geographic Information Systems - C Library
ii libgeos-dev 3.4.2-4ubuntu1 amd64 Geometry engine for GIS - Development files
$ apt-cache policy libgeos-3.4.2
libgeos-3.4.2:
Installed: 3.4.2-4ubuntu1
Candidate: 3.4.2-4ubuntu1
Version table:
*** 3.4.2-4ubuntu1 0
500 http://de.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
100 /var/lib/dpkg/status
My guess is that PostGIS is expecting a different version of GEOS. The question is which? And where from to install it?
Update: There are some hints of this issue being caused by an outdated version of liblwgeom
. I thus removed all related packages (apt-get purge liblwgeom*
) and re-installed PostGIS. This is what I have now:
$ dpkg -l | grep liblwgeom
ii liblwgeom-2.1.3 2.1.3+dfsg-3.pgdg14.04+2 amd64 PostGIS "Lightweight Geometry" library
But the problem remains.
dpkg -l | grep libgeos
in the question). What is exactly your point?