I was experimenting on macOS and tried
- installing postgresql@11 using HomeBrew. Everything went well at first.
- After that, I uninstalled it
- this time installed postgresql@14 which went fine too.
- I uninstalled postgresql@14
- I wanted to install postgresql@11 again
but this time I am having problems.
*dyld[78742]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib
Referenced from: <0F8BEC0C-41F5-3781-B77A-20C013908EA6> /opt/homebrew/Cellar/postgresql@11/11.22_1/bin/postgres
Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file),
'/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file),
'/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file),
'/usr/local/lib/libicui18n.73.dylib' (no such file),
'/usr/lib/libicui18n.73.dylib' (no such file, not in dyld cache),
'/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file),
'/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file),
'/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file),
'/usr/local/lib/libicui18n.73.dylib' (no such file),
'/usr/lib/libicui18n.73.dylib' (no such file, not in dyld cache)
no data was returned by command ""/opt/homebrew/Cellar/postgresql@11/11.22_1/bin/postgres" -V"
The program "postgres" is needed by initdb but was not found in the same directory as "/opt/homebrew/Cellar/postgresql@11/11.22_1/bin/initdb".
Check your installation.
I can start postgresql@11 as a service but when I run psql, I get this:
psql: could not connect to server: Connection refused
Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
I tried brew link --overwrite postgresql@11
but I still get the same problems.