Trouble installing PostgreSQL

Behrang Saeedzadeh behrangsa at gmail.com
Sun Dec 9 19:29:27 PST 2012


This is happening on Mountain Lion. After installing postgresql92-server, I
followed the instructions and I am getting this error:

To create a database instance, after install do
 sudo mkdir -p /opt/local/var/db/postgresql92/defaultdb
 sudo chown postgres:postgres /opt/local/var/db/postgresql92/defaultdb
 sudo su postgres -c '/opt/local/lib/postgresql92/bin/initdb -D
/opt/local/var/db/postgresql92/defaultdb'

To tweak your DBMS, consider increasing kern.sysv.shmmax by adding an
increased kern.sysv.shmmax .. to /etc/sysctl.conf

--->  Cleaning postgresql92-server
--->  Removing work directory for postgresql92-server
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.
Nexus:Downloads behrangsa$ sudo mkdir -p
/opt/local/var/db/postgresql92/defaultdb
Password:
Nexus:Downloads behrangsa$ sudo chown postgres:postgres
/opt/local/var/db/postgresql92/defaultdb
Nexus:Downloads behrangsa$  sudo su postgres -c
'/opt/local/lib/postgresql92/bin/initdb -D
/opt/local/var/db/postgresql92/defaultdb'
shell-init: error retrieving current directory: getcwd: cannot access
parent directories: Permission denied
could not identify current directory: Permission denied
could not identify current directory: Permission denied
could not identify current directory: Permission denied
The program "postgres" is needed by initdb but was not found in the
same directory as "initdb".
Check your installation.

Any ideas what could be wrong?

Cheers,
Behrang Saeedzadeh
http://www.behrang.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20121210/504c5352/attachment.html>


More information about the macports-users mailing list