Since installing postgresql@14 I have encountered an unwanted isse. By running dbt locally I get an error, specifically by running dbt debug
following error message appears:
Encountered an error:
dlopen(/opt/homebrew/lib/python3.10/site-packages/psycopg2/_psycopg.cpython-310-darwin.so, 0x0002): Library not loaded: '/opt/homebrew/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib'
Referenced from: '/opt/homebrew/lib/python3.10/site-packages/psycopg2/_psycopg.cpython-310-darwin.so'
Reason: tried: '/opt/homebrew/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib' (no such file), '/usr/local/lib/libpq.5.dylib' (no such file), '/usr/lib/libpq.5.dylib' (no such file)
As this error did not appear ever before, my hypothesis is that it is caused when I installed postgresql@14
. So I think I need to adjust the location where dbt is looking for psycopg2
.
Is there a way to unlink postgresql@14
and link postgresql@13
or postgresql
(I even uninstalled postgresql@14 according this link). As unlink seems not to work I suppose that is not the correct terminology.
Any possible solution or an indication of the source of the error is much appreciated.