![]() ![]() ![]() Install PostgreSQL with brew install Load the service with brew services load Check that service configuration points to the proper directory now less View the log file less and find that the postmaster.pid exists and prevents the server from starting.Uninstall PostgreSQL with brew uninstall Unload the service definition with brew services unload Run brew services info to make sure that the service is not loaded, is not running and is not schedulable (if it is you may need to run some another commands).No such file or directory Run initdb or pgbasebackup to initialize a PostgreSQL data directory. I just ran a minor version update 14.7 - 14.8 to try an fix a missing file/ library issue. And I also found that the service can not start now because its configuration points to the wrong directory. Im using postgres v14 installed via Homebrew on MacOS Ventura. I updated the PostgreSQL to the version 14 and moved the data directory with mv -v "/opt/homebrew/var/postgres" (like installation script proposed me to do). Le, not in dyld cache) - /src/app/.bundle/ruby/3.0.0/gems/pg-1.3.4/lib/pg_ext.bundle Ile), '/opt/homebrew/opt/postgresql/lib/libpq.5.dylib' (no such file), '/usr/local/lib/libpq.5.dylib' (no such file), '/usr/lib/libpq.5.dylib' (no such file, not in dyld (no such file), such file), (no such file), '/usr/local/lib/libpq.5.dylib' (no such file), '/usr/lib/libpq.5.dylib' (no such fi Reason: tried: '/opt/homebrew/opt/postgresql/lib/libpq.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/postgresql/lib/libpq.5.dylib' (no such f Remove the PostgreSQL folder from the system Library: sudo rm -rf /. LoadError: dlopen(/src/app/.bundle/ruby/3.0.0/gems/pg-1.3.4/lib/pg_ext.bundle, 0x0009): Library not loaded: /opt/homebrew/opt/postgresql/lib/ How to remove PostgreSQL using Terminal Remove the ini file: sudo rm /etc/postgres-reg. Step-by-step reproduction instructions (by running brew commands) The directory where your actual database data is stored is different from the one where your PostgreSQL binaries are installed. Manually editing the plist at to change the line /opt/homebrew/var/postgres to instead read fixed the service. ![]() PostgreSQL Database directory appears to contain a database. I also expected the output "started successfully" to mean that the daemon was running, not crashed. Steps to properly install Postgres via Homebrew on MAC : brew install postgres. usr/local/postgres doesn't exist on my Mac. The postgres command seems to require the location of the data directory. I expected brew services restart to start postgres. 195 I forgot how I started PostgreSQL the last time (it was months ago) and I don't remember where the data directory is located. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |