Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am facing the following error upon PostgreSQL installation on MacOsX:

sh-3.2# sudo port install postgresql84-server
--->  Computing dependencies for postgresql84-server
--->  Staging postgresql84-server into destroot
Error: Target org.macports.destroot returned: shell command failed (see log for details)
Log for postgresql84-server is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_postgresql84-server/postgresql84-server/main.log
Error: Status 1 encountered during processing.
To report a bug, see <>
sh-3.2# tail  /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_postgresql84-server/postgresql84-server/main.log
:info:destroot ./Library missing (directory not created: File exists)
:debug:destroot Executing org.macports.destroot (postgresql84-server)
:info:destroot chown: postgres: Invalid argument
:info:destroot shell command "chown -R postgres:postgres /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_postgresql84-server/postgresql84-server/work/destroot/opt/local/var/log/postgresql84" returned error 1
:error:destroot Target org.macports.destroot returned: shell command failed (see log for details)
:debug:destroot Backtrace: shell command failed (see log for details)
    while executing
"$procedure $targetname"
:info:destroot Warning: the following items did not execute (for postgresql84-server): org.macports.activate org.macports.destroot org.macports.install
:notice:destroot Log for postgresql84-server is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_postgresql84-server/postgresql84-server/main.log
sh-3.2# chown -R postgres:postgres /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_databases_postgresql84-server/postgresql84-server/work/destroot/opt/local/var/log/postgresql84
chown: postgres: Invalid argument
sh-3.2# groups
wheel daemon kmem sys tty operator procview procmod everyone staff certusers _appstore localaccounts admin _lpadmin _lpoperator _developer
sh-3.2# su postgres
su: unknown login: postgres

Could anybody direct me to the right direction on how to install PostgreSQL?

Should I make a user postgres and group postgres manually?

share|improve this question

migrated from Mar 20 '12 at 5:54

This question came from our site for professional and enthusiast programmers.

i would suggest using homebrew instead: – corroded Mar 14 '12 at 16:24
--- /opt/local/var/macports/sources/    2012-03-25 01:43:40.000000000 +0800
+++ /opt/local/var/macports/sources/    2012-03-25 01:34:29.000000000 +0800
@@ -26,8 +26,8 @@
 set libdir     ${prefix}/lib/postgresql91
 set dbdir      ${prefix}/var/db/postgresql91/defaultdb
 set logdir     ${prefix}/var/log/postgresql91
-set dbuser     postgres
-set dbgrp      postgres
+set dbuser     _postgres
+set dbgrp      _postgres

 startupitem.create yes
 startupitem.init   \
share|improve this answer
Can you please explain a bit more than just posting a few lines of diff? – slhck Mar 24 '12 at 17:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .