1

My system is macOS 10.15.7

I installed postgresql-9.5 from EDB.When the installation is complete, I executed the following command:

cd /Library/PostgreSQL/9.5/bin

sudo ./pg_ctl -D /Library/PostgreSQL/9.5/data start

An error occur

dyld: Library not loaded: @loader_path/../lib/libpq.5.dylib
  Referenced from: /Library/PostgreSQL/9.5/bin/./pg_ctl
  Reason: no suitable image found.  Did find:
    /Library/PostgreSQL/9.5/bin/./../lib/libpq.5.dylib: code signing blocked mmap() of '/Library/PostgreSQL/9.5/bin/./../lib/libpq.5.dylib'
    /Library/PostgreSQL/9.5/bin/./../lib/libpq.5.dylib: stat() failed with errno=1
    /Library/PostgreSQL/9.5/bin/../lib/libpq.5.dylib: code signing blocked mmap() of '/Library/PostgreSQL/9.5/bin/../lib/libpq.5.dylib'
    /Library/PostgreSQL/9.5/bin/../lib/libpq.5.dylib: stat() failed with errno=1
    file system relative paths not allowed in hardened programs
zsh: abort      ./pg_ctl -D /Library/PostgreSQL/9.5/data start

The related soft connections are as follows:

/Library/PostgreSQL/9.5/lib

-rwxr-xr-x 1 root daemon 384752 2 10 14:07 libpq.5.8.dylib

lrwxr-xr-x 1 root daemon 15 3 20 16:54 libpq.5.dylib -> libpq.5.8.dylib

/usr/local/lib

lrwxr-xr-x 1 root admin 41 3 21 23:38 libpq.5.dylib -> /Library/PostgreSQL/9.5/lib/libpq.5.dylib

Please help me,thanks everyone.

Pychong
  • 155
  • 2
  • 13
  • The PG 9.5 is certified only on 10.8 - 10.10. It is better to use a supported version for your OS, which is PG13 for mac OS version 10.13 - 10.15 – Amjad Shahzad Mar 24 '21 at 11:19
  • @Amjad Shahzad I still don't have a definite answer to this question, but I found another way to solve it.Download the **postgres.app** from https://postgresapp.com/downloads.html and chose the `Postgres.app with all currently supported versions`.Start postgresql server in mac os according to https://postgresapp.com. And the PG9.5 can certified macos 10.15.7 – Pychong Mar 29 '21 at 05:57

0 Answers0