I have installed PostgreSQL 11 on Ubuntu 18 and while creating PostGIS extension it gives this error.

could not load library "/usr/lib/postgresql/11/lib/postgis-2.5.so": /usr/lib/postgresql/11/lib/postgis-2.5.so: undefined symbol: AllocSetContextCreate

The command I used to download PostGIS

apt install postgis postgresql-11-postgis-2.5
  • can you please let me know which version of geos you are using? you can try "geos-config --version" command in terminal to check the installed version of geos. – Asad Abbas Nov 9 '18 at 8:46

This error is most likely due to older version of geos, you need to install latest version of geos, you can trysudo apt-get install libgeos-3.6.2 to get latest version. Hope this answers your question.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.