2

I'm trying to use sql with diesel in an arm64 process trust. So I did the disel setup and got the following error. In other words, I think I need to use postgresql for arm64. How should I install it?

dyld: Library not loaded: @rpath/libpq.5.dylib
  Referenced from: /Users/~~/.cargo/bin/diesel
  Reason: no suitable image found.  Did find:
    /Applications/Postgres.app/Contents/Versions/13/lib/libpq.5.dylib: mach-o, but wrong architecture
    /Applications/Postgres.app/Contents/Versions/13/lib/libpq.5.dylib: stat() failed with errno=1
[1]    51392 abort      diesel setup 

When I ran the following command, I received the following error

arch -arm64 brew install postgresql
Please create a new installation in /opt/homebrew using one of the
"Alternative Installs" from:
  https://docs.brew.sh/Installation
You can migrate your previously installed formula list with:
  brew bundle dump

How do I install it?

Herohtar
  • 5,347
  • 4
  • 31
  • 41
musako
  • 897
  • 2
  • 10
  • 26
  • postgres.app is apparently not yet M1-compatible (see [Issue 602](https://github.com/PostgresApp/PostgresApp/issues/602) and [PR 621](https://github.com/PostgresApp/PostgresApp/pull/621), so you probably need to install the "raw" postgres using homebrew or macports. Though note that [there seems to be issues between postgres and M1 / Big Sur](https://stackoverflow.com/questions/65687712/postgres-errors-on-arm-based-m1-mac-w-big-sur). – Masklinn Apr 29 '21 at 13:34

0 Answers0