-1

I am relatively new to postgres and postgis, and I am trying to retrieve data from a database based on a column named coordinates and how close those coordinates are from a point (x,y) I use this query:

SELECT * FROM myTable
WHERE ST_DWithin(
Geometry(coordinates),
Geometry(ST_MakePoint(5,5)),
800);

I get the next error:

ERROR:  could not load library
"/Applications/Postgres.app/Contents/Versions/9.6/lib/postgresql/postgis-2.3.so":
dlopen(/Applications/Postgres.app/Contents/Versions/9.6/lib/postgresql/posgis-2.3.so, 10):
Symbol not found: _GEOSMinimumClearance
Referenced from:
/Applications/Postgres.app/Contents/Versions/9.6/lib/postgresql/postgis-2.3.so
Expected in: flat namespace
in
/Applications/Postgres.app/Contents/Versions/9.6/lib/postgresql/postgis-2.3.so

I already solved previous problems installing GEOS and then proj, but now I cant solve this one.

Please help.

2 Answers2

1

That looks like you installed a version of PostGIS that needs a later version of GEOS than the one you installed.

Your PostGIS references the GEOS function GEOSMinimumClearance, but that doesn't exist in your GEOS library, so the dynamic linker throws an error.

Install a more recent version of GEOS.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
0

Sadly I could't find out the cause of my problem, I am thinking it was due to multiple versions of postgre and postgis installed at the same time.

However I was able to find a solution!, I followed this guide.