[MacPorts] #32817: postgresql91-server @9.1.2_0 initialization fails

MacPorts noreply at macports.org
Mon Jan 9 04:12:51 PST 2012


#32817: postgresql91-server @9.1.2_0 initialization fails
----------------------------------+-----------------------------------------
 Reporter:  gunnlaugur@…          |       Owner:  macports-tickets@…                   
     Type:  defect                |      Status:  new                                  
 Priority:  Normal                |   Milestone:                                       
Component:  ports                 |     Version:  2.0.3                                
 Keywords:  lion                  |        Port:  postgresql91-server                  
----------------------------------+-----------------------------------------
 Following install of postgresql91-server, I get these instructions:

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

 The first two lines go OK, but the `initdb` line fails:

 {{{
 $ sudo su postgres -c '/opt/local/lib/postgresql91/bin/initdb -D
 /opt/local/var/db/postgresql91/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.
 }}}

 The permissions look OK to me:

 {{{
 $ ls -ld /opt/local/var/db/postgresql91/defaultdb
 drwxr-xr-x  2 postgres  postgres  68  9 jan 11:51
 /opt/local/var/db/postgresql91/defaultdb

 $ ls -ld /opt/local/var/db/postgresql91
 drwxr-xr-x  3 root  admin  102  9 jan 11:51 /opt/local/var/db/postgresql91

 $ ls -ld /opt/local/lib/postgresql91/bin/{initdb,postgres}
 -rwxr-xr-x  1 root  admin    71336  9 jan 11:49
 /opt/local/lib/postgresql91/bin/initdb
 -rwxr-xr-x  1 root  admin  5329336  9 jan 11:49
 /opt/local/lib/postgresql91/bin/postgres

 $ ls -ld /opt/local/lib/postgresql91/bin
 drwxr-xr-x  25 root  admin  850  9 jan 11:49
 /opt/local/lib/postgresql91/bin
 }}}

 so I don't know what this is about.

 The same happens with `postgresql90-server`. I have `postgresql84-server`
 installed and have been using it without problems for a long time.

 I'm on Lion, in case this is specific to that:

 {{{
 $ port platform
 Platform: darwin 11 i386
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/32817>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list