Thread: initdb/XP/could not locate executable

initdb/XP/could not locate executable

From
Pete Boysen
Date:
I am having trouble getting postgres initdb to run on an XP machine under the postgres account.  Here are the
particulars:

1. cygwin 1.3.18-1
2. cygipc 1.13-2
3. Windows XP-Pro
4. Same configuration installs correctly on my laptop
5. My desktop system is the same except for Novell Login Client (if that makes any difference)
6. initdb runs fine under my desktop administrator account
7. Giving postgres administrator privileges still doesn't fix the problem
8. I have installed this system successfully many times under Win2K.

Any suggestions of where I could look?  I have Googled and looked at mail archives and although there are a few reports
of similar problems, I didn't find any solutions.

postgres@PBOYSEN ~
$ ipc-daemon&
[1] 2324

postgres@PBOYSEN ~
$ initdb -D /usr/share/postgresql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

Fixing permissions on existing directory /usr/share/postgresql/data... ok
creating directory /usr/share/postgresql/data/base... ok
creating directory /usr/share/postgresql/data/global... ok
creating directory /usr/share/postgresql/data/pg_xlog... ok
creating directory /usr/share/postgresql/data/pg_clog... ok
creating template1 database in /usr/share/postgresql/data/base/1... ok
creating configuration files... ok
initializing pg_shadow... LOG:  FindExec: invalid binary "/usr/bin/postgres"
FATAL:  /usr/bin/postgres: could not locate executable, bailing out...

initdb failed.
[1]+  Done                    ipc-daemon


Pete Boysen    Iowa State University  pboysen@iastate.edu
(515)294-6663  Ames, Iowa 50011 http://www.public.iastate.edu/~pboysen



Re: initdb/XP/could not locate executable

From
"Tambet Matiisen"
Date:

...
> initializing pg_shadow... LOG:  FindExec: invalid binary
> "/usr/bin/postgres"
> FATAL:  /usr/bin/postgres: could not locate executable, bailing out...
>

Following seemed to fix the problem in our case:

chmod 755 /usr/bin
chmod 755 /usr/bin/postgres

I'm not sure the first one is really needed.

  Tambet

Re: initdb/XP/could not locate executable

From
Jason Tishler
Date:
Tambet,

On Mon, Jan 13, 2003 at 10:58:16AM +0200, Tambet Matiisen wrote:
> ...
> > initializing pg_shadow... LOG:  FindExec: invalid binary "/usr/bin/postgres"
> > FATAL:  /usr/bin/postgres: could not locate executable, bailing out...
> >
>
> Following seemed to fix the problem in our case:
>
> chmod 755 /usr/bin
> chmod 755 /usr/bin/postgres
>
> I'm not sure the first one is really needed.

Only the second one is need to solve the problem this time.  But, the
first will prevent it from happening again when setup.exe installs a
newer version of PostgreSQL.

I believe that following may solve this problem once and for all:

    http://cygwin.com/ml/cygwin-apps/2003-01/msg00105.html
    http://cygwin.com/ml/cygwin-apps/2003-01/msg00106.html

Thanks for your help.

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