PostgREST / postgrest-docs

This repo is archived and will be merged into postgrest/postgrest soon.
http://postgrest.org
MIT License
365 stars 164 forks source link

Library not loaded on Mac #708

Closed trapperkeeper closed 7 months ago

trapperkeeper commented 7 months ago

I'm having an issue with the v11.2.2 executable for Mac. Every time I run it I get the following error:

Library not loaded: /usr/local/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib

I had Postgres 16 installed (and had never had 14 on this machine). I've tried the following:

  1. My original Postgres installation was don using the EDB installer for Mac
  2. I tried using Postgres.app instead
  3. I tried installing Postgres 14 with Homebrew
  4. I tried using the Linux static executable from Postgrest instead of the Mac version (this didn't run at all).

1-3 above gave me the same error. None of those installers wrote anything to /usr/local/opt. #4 just didn't run. #3 should have addressed the fix mentioned on the Postgrest site (to do a Homebrew install). I secifically ran 'brew install postgresql@14', and in case it helped 'brew services start postgresql@14'.

laurenceisla commented 7 months ago

It looks like there may be some issues lately with Macs and PostgREST binaries. What seemed to solve the issue was not using the binary and installing it using brew:

brew install postgrest

Does that work for you?

trapperkeeper commented 7 months ago

Will give it a try and report back, thanks.

trapperkeeper commented 7 months ago

I haven't yet tested end-to-end as I need to recreate my DB (while trying the various different Postgresql installation methods above). But using 'brew install postgrest' did get me through the installation process.

trapperkeeper commented 7 months ago

The end-to-end test worked as well, thanks for the assist.