James Dietrich wrote:
  >
  >While installing postgresql 6.3-2 with dselect, the following error message
  >appears during the config phase:
  >
  >Setting up postgresql (6.3-2) ...
  >Now installing the PostgreSQL database files in /var/postgres/data
  >su - postgres -c initdb -l /usr/lib/postgresql/lib -r /var/postgres/data -u 
      >postgres
  >-sh: initdb: command not found
  >dpkg: error processing postgresql (--configure):
  > subprocess post-installation script returned error exit status 127
  >Errors were encountered while processing:
  > postgresql
  >
  >I have made sure that /usr/lib/postgresql/bin in part of root's PATH.  In fa
      >ct,
  >if I exit dselect and type initdb at the command line, the message about
  >needing to specify some options to initdb is printed, so I know that it is
  >finding initdb.
  >
  >What do I need to do to finish configuring postgresql?
  >
  >I am running the latest from hamm, and do not have the package secure-su
  >installed.  Is that package needed?

secure-su is the problem here; it does not run ~user/.profile even if you
use `su - user  -c ...', so the path is not getting set correctly.
In the next postgresql release, the full path will be set explicitly in the
su command.

To get round your immediate problem, become the postgres user by logging
in directly or by `su - postgres'  (no -c <command>) and run initdb from
there.

-- 
Oliver Elphick                                [EMAIL PROTECTED]
Isle of Wight                              http://www.lfix.co.uk/oliver

PGP key from public servers; key ID 32B8FAA1



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to