Thread: initdb, could not locate postgres executable
Hi, Under CygWin on Windows XP Pro I've been using PostgreSQL 7.3 for a year, then I decided to switch to PostgreSQL 7.4-1. When I run initdb the following error occurs: creating directory /cygdrive/d/pgsql.data... ok creating directory /cygdrive/d/pgsql.data/base... ok creating directory /cygdrive/d/pgsql.data/global... ok creating directory /cygdrive/d/pgsql.data/pg_xlog... ok creating directory /cygdrive/d/pgsql.data/pg_clog... ok selecting default max_connections... 100 selecting default shared_buffers... 1000 creating configuration files... ok creating template1 database in /cygdrive/d/pgsql.data/base/1... ok initializing pg_shadow... FATAL: /usr/bin/postgres: could not locate postgres executable I believe there might be an environment variable that is not set or set incorrectly. I've tried to uninstall CygWin, cleared all related Windows XP users account, cleared all CygWin environment variables. Then I installed CygWin from scratch - no changes, I'm getting the same error. I also tried to downgrade PostgreSQL to version 7.3 - the same problem (at least it's not related to PostgreSQL 7.4). If anyone has thoughts - please share with me. -- Thanks in advance Grigoriy Puzankin
On Fri, Nov 28, 2003 at 11:59:57AM +0300, Grigoriy Puzankin wrote: ... snip ... > creating configuration files... ok > creating template1 database in /cygdrive/d/pgsql.data/base/1... ok > initializing pg_shadow... FATAL: /usr/bin/postgres: could not locate postgres executable I got this same problem when I ran dbinit in a user account other than the one that installed Cygwin. I installed as administrator, then ran as user. Switching over to the admin account got it to run fine. This is explained in the ms faq page patch I mailed to the list the other day. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
On Fri, Nov 28, 2003 at 12:28:40PM -0500, Daniel Convissor wrote: > On Fri, Nov 28, 2003 at 11:59:57AM +0300, Grigoriy Puzankin wrote: > ... snip ... > > creating configuration files... ok > > creating template1 database in /cygdrive/d/pgsql.data/base/1... ok > > initializing pg_shadow... FATAL: /usr/bin/postgres: could not locate postgres executable > > [snip] > > This is explained in the ms faq page patch I mailed to the list the > other day. It is also explained in the README that is part of the pre-built Cygwin PostgreSQL package. Specifically, the following: 4. Cygwin PostgreSQL can fail to start or not function properly if certain files and directories have incorrect permissions. The following usually solves these kinds of problems: $ chmod a+rwx /tmp $ chmod a+rx /usr/bin /usr/bin/* $ chmod a+rw /var/log # could adversely affect other daemons Jason -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6