Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm having issues installing postgresql with homebrew on my MBP running OS 10.6.8.

It finishes

sudo brew install postgresql

without any issues.

When I try:

initdb /usr/local/var/postgres

I get the following error:

This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".

fixing permissions on existing directory /usr/local/var/postgres ... initdb: could not change permissions of directory "/usr/local/var/postgres": Operation not permitted

But when I try to run

  mkdir -p ~/Library/LaunchAgents
  cp /usr/local/Cellar/postgresql/9.1.1/org.postgresql.postgres.plist ~/Library/LaunchAgents/
  launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist

I get the following error:

launchctl: CFURLWriteDataAndPropertiesToResource(/var/db/launchd.db/com.apple.launchd.peruser.501/overrides.plist) failed: -10

I don't understand how to fix this.

So I was a little impatient and then tried to startup postgres manually anyway and it wouldn't work.

Anyway, I don't know how to proceed. Any suggestions?

share

migration rejected from stackoverflow.com Mar 22 at 18:57

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Michael Hampton Mar 22 at 18:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – Michael Hampton
If this question can be reworded to fit the rules in the help center, please edit the question.

    
First thing would be to check with whomever is maintaining the brew script for postgres. Also, check the permissions of the /usr/local/var/postgres directory. Sounds like maybe root owns the dir and whatever user the postgres daemon tries to start as isn't root... –  Peter Loron Dec 8 '11 at 4:37
    
I just checked that out. The directory is owned by Wheel. I'm the only user on my machine and I have root access. Thanks for helping my brainstorm. –  Cyrus Dec 8 '11 at 4:53