1

brew doctor says 'Your system is ready to brew.' Upon installing with homebrew :

brew uninstall postgres && brew install postgres

I always get the following error :

Data page checksums are disabled.

fixing permissions on existing directory /usr/local/var/postgres ... initdb: could not change permissions of directory "/usr/local/var/postgres": Operation not permitted
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall postgresql`
  • Did suggested steps. Installation still stops at : fixing permissions on existing directory /usr/local/var/postgres ... initdb: could not change permissions of directory "/usr/local/var/postgres": Operation not permitted – Michael May 30 '16 at 20:24
  • At the moment I'm maltreating my VM with all misconfigs I can think of to be able to reproduce the error – klanomath May 30 '16 at 20:31
  • 1
    OK I have been able to reproduce the behavior. This is probably a permission/ownership problem. You probably installed brew with another user than postgres. In my test environment I installed brew with userA and postgres with userB (after fixing some dirs' & files' permissions). The post-install failed. Then I executed initdb and after first fixing some other ownerships/permissions I finally get the same error. – klanomath May 30 '16 at 20:53
  • Please add the output of initdb -d -D /usr/local/var to your question (by editing it). – klanomath May 30 '16 at 21:01
  • I tried postgresapp.com. After adding the $PATH & the 'pg' gem I am just created a simple app. It looks like it works so far. – Michael May 30 '16 at 23:06

You must log in to answer this question.

Browse other questions tagged .