Symbolic linking issue in local postgres instance on MacOS

Viewed 94

Having recently upgraded postgresql and gdal using homebrew, I am stuck with a could not load library error when trying to run a GDAL command that creates a connection to a local postgres database:

ERROR 1: ERROR:  could not load library "/usr/local/lib/postgresql/postgis-3.so": dlopen(/usr/local/lib/postgresql/postgis-3.so, 10): Symbol not found: _hash_bytes
  Referenced from: /usr/local/lib/postgresql/postgis-3.so
  Expected in: /usr/local/opt/postgresql/bin/postgres
 in /usr/local/lib/postgresql/postgis-3.so

ERROR 1: PROJ: proj_identify: Cannot find proj.db
ERROR 1: ERROR:  could not load library "/usr/local/lib/postgresql/postgis-3.so": dlopen(/usr/local/lib/postgresql/postgis-3.so, 10): Symbol not found: _hash_bytes
  Referenced from: /usr/local/lib/postgresql/postgis-3.so
  Expected in: /usr/local/opt/postgresql/bin/postgres
 in /usr/local/lib/postgresql/postgis-3.so

I am confused by the "Referenced from: Expected in:" part When I check the folder /usr/local/lib/postgresql/ , I see that the postgis-3.so file is symbolically linked to another directory

cd /usr/local/lib/postgresql/
ls -l

returns
...
postgis-3.so -> ../../Cellar/postgis/3.0.3/lib/postgresql/postgis-3.so

How should this error be interpreted and are there any suggestions on further steps to take in this case?

0 Answers
Related