This question already has an answer here:

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

marked as duplicate by JGH, Andre Silva, LaughU, Jochen Schwarze, xunilk Nov 13 '18 at 0:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

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