pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
initdb fails on AIX
6+ messages / 3 participants
[nested] [flat]

* initdb fails on AIX
@ 2011-08-10 19:08 CS DBA <cs_dba@consistentstate.com>
  2011-08-10 19:16 ` Re: initdb fails on AIX Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: CS DBA @ 2011-08-10 19:08 UTC (permalink / raw)
  To: pgsql-admin

Hi All;

We're getting the following error when we try to run initdb on an AIX box:


fgets failure: Error 0
The program "postgres" is needed by initdb but was not found in the same 
directory as "/opt/app/postgres/904/bin/initdb".
Check your installation.


We did this:

1) installed (via source) postgresql 9.0.4 using the following 
parameters for the configure command:

--prefix=opt/app/postgres/904 --with-openssl

2) added opt/app/postgres/904 to the current PATH

3) exported PGDATA=/pgdata/newdb

4) ran "initdb"

Note: we also ran "initdb -D /pgdata/newdb" with the same results



Thoughts?



-- 
---------------------------------------------
Kevin Kempter       -       Constent State
A PostgreSQL Professional Services Company
           www.consistentstate.com
---------------------------------------------




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: initdb fails on AIX
  2011-08-10 19:08 initdb fails on AIX CS DBA <cs_dba@consistentstate.com>
@ 2011-08-10 19:16 ` Tom Lane <tgl@sss.pgh.pa.us>
  2011-08-10 20:14   ` Re: initdb fails on AIX CS DBA <cs_dba@consistentstate.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2011-08-10 19:16 UTC (permalink / raw)
  To: CS DBA <cs_dba@consistentstate.com>; +Cc: pgsql-admin

CS DBA <cs_dba@consistentstate.com> writes:
> We're getting the following error when we try to run initdb on an AIX box:

> fgets failure: Error 0
> The program "postgres" is needed by initdb but was not found in the same 
> directory as "/opt/app/postgres/904/bin/initdb".
> Check your installation.

This means that initdb tried to execute "postgres -V" and didn't get any
output.  What happens when you try that directly?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: initdb fails on AIX
  2011-08-10 19:08 initdb fails on AIX CS DBA <cs_dba@consistentstate.com>
  2011-08-10 19:16 ` Re: initdb fails on AIX Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-08-10 20:14   ` CS DBA <cs_dba@consistentstate.com>
  2011-08-10 20:22     ` Re: initdb fails on AIX Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: CS DBA @ 2011-08-10 20:14 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

On 08/10/2011 01:16 PM, Tom Lane wrote:
> CS DBA<cs_dba@consistentstate.com>  writes:
>> We're getting the following error when we try to run initdb on an AIX box:
>> fgets failure: Error 0
>> The program "postgres" is needed by initdb but was not found in the same
>> directory as "/opt/app/postgres/904/bin/initdb".
>> Check your installation.
> This means that initdb tried to execute "postgres -V" and didn't get any
> output.  What happens when you try that directly?
>
> 			regards, tom lane

See below.  One oddity, if I compile without the --with-openssl flag 
(for the configure command) then it works fine.

Also, I forgot to mention that we are having to add the 
--disable-thread-safety flag or the configure command fails complaining 
that the platform is not thread safe - I suspect this is not the issue 
but figured I should mention it just in case...



$ ./postgres -V
exec(): 0509-036 Cannot load program ./postgres because of the following 
errors:
         0509-150   Dependent module libcrypto.a(libcrypto.so.0.9.7) 
could not be loaded.
         0509-022 Cannot load module libcrypto.a(libcrypto.so.0.9.7).
         0509-026 System error: A file or directory in the path name 
does not exist.


-- 
---------------------------------------------
Kevin Kempter       -       Constent State
A PostgreSQL Professional Services Company
           www.consistentstate.com
---------------------------------------------




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: initdb fails on AIX
  2011-08-10 19:08 initdb fails on AIX CS DBA <cs_dba@consistentstate.com>
  2011-08-10 19:16 ` Re: initdb fails on AIX Tom Lane <tgl@sss.pgh.pa.us>
  2011-08-10 20:14   ` Re: initdb fails on AIX CS DBA <cs_dba@consistentstate.com>
@ 2011-08-10 20:22     ` Tom Lane <tgl@sss.pgh.pa.us>
  2011-08-10 20:26       ` Re: initdb fails on AIX CS DBA <cs_dba@consistentstate.com>
  2011-08-11 12:50       ` Re: initdb fails on AIX Nicholson, Brad (Toronto, ON, CA) <bnicholson@hp.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Tom Lane @ 2011-08-10 20:22 UTC (permalink / raw)
  To: CS DBA <cs_dba@consistentstate.com>; +Cc: pgsql-admin

CS DBA <cs_dba@consistentstate.com> writes:
> On 08/10/2011 01:16 PM, Tom Lane wrote:
>> This means that initdb tried to execute "postgres -V" and didn't get any
>> output.  What happens when you try that directly?

> See below.  One oddity, if I compile without the --with-openssl flag 
> (for the configure command) then it works fine.

> exec(): 0509-036 Cannot load program ./postgres because of the following 
> errors:
>          0509-150   Dependent module libcrypto.a(libcrypto.so.0.9.7) 
> could not be loaded.
>          0509-022 Cannot load module libcrypto.a(libcrypto.so.0.9.7).
>          0509-026 System error: A file or directory in the path name 
> does not exist.

Well, yeah.  It looks like there is something pretty broken about your
openssl installation.  At the very least you need a LD_LIBRARY_PATH (or
local equivalent) pointing to wherever libcrypto.so is hiding ... but
a reasonable installation of openssl should have taken care of that for
you.  Possibly you could build postgres with an rpath (or local
equivalent) pointing to openssl's library directory.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: initdb fails on AIX
  2011-08-10 19:08 initdb fails on AIX CS DBA <cs_dba@consistentstate.com>
  2011-08-10 19:16 ` Re: initdb fails on AIX Tom Lane <tgl@sss.pgh.pa.us>
  2011-08-10 20:14   ` Re: initdb fails on AIX CS DBA <cs_dba@consistentstate.com>
  2011-08-10 20:22     ` Re: initdb fails on AIX Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-08-10 20:26       ` CS DBA <cs_dba@consistentstate.com>
  1 sibling, 0 replies; 6+ messages in thread

From: CS DBA @ 2011-08-10 20:26 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

On 08/10/2011 02:22 PM, Tom Lane wrote:
> CS DBA<cs_dba@consistentstate.com>  writes:
>> On 08/10/2011 01:16 PM, Tom Lane wrote:
>>> This means that initdb tried to execute "postgres -V" and didn't get any
>>> output.  What happens when you try that directly?
>> See below.  One oddity, if I compile without the --with-openssl flag
>> (for the configure command) then it works fine.
>> exec(): 0509-036 Cannot load program ./postgres because of the following
>> errors:
>>           0509-150   Dependent module libcrypto.a(libcrypto.so.0.9.7)
>> could not be loaded.
>>           0509-022 Cannot load module libcrypto.a(libcrypto.so.0.9.7).
>>           0509-026 System error: A file or directory in the path name
>> does not exist.
> Well, yeah.  It looks like there is something pretty broken about your
> openssl installation.  At the very least you need a LD_LIBRARY_PATH (or
> local equivalent) pointing to wherever libcrypto.so is hiding ... but
> a reasonable installation of openssl should have taken care of that for
> you.  Possibly you could build postgres with an rpath (or local
> equivalent) pointing to openssl's library directory.
>
> 			regards, tom lane



Thanks, I'll see if I can track down the libcrypto location and try 
tweaking LD_LIBRARY_PATH first..
Thanks again for the help.

/Kevin

-- 
---------------------------------------------
Kevin Kempter       -       Constent State
A PostgreSQL Professional Services Company
           www.consistentstate.com
---------------------------------------------




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: initdb fails on AIX
  2011-08-10 19:08 initdb fails on AIX CS DBA <cs_dba@consistentstate.com>
  2011-08-10 19:16 ` Re: initdb fails on AIX Tom Lane <tgl@sss.pgh.pa.us>
  2011-08-10 20:14   ` Re: initdb fails on AIX CS DBA <cs_dba@consistentstate.com>
  2011-08-10 20:22     ` Re: initdb fails on AIX Tom Lane <tgl@sss.pgh.pa.us>
@ 2011-08-11 12:50       ` Nicholson, Brad (Toronto, ON, CA) <bnicholson@hp.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Nicholson, Brad (Toronto, ON, CA) @ 2011-08-11 12:50 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; CS DBA <cs_dba@consistentstate.com>; +Cc: pgsql-admin

> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-
> owner@postgresql.org] On Behalf Of Tom Lane
> Sent: Wednesday, August 10, 2011 4:22 PM
> To: CS DBA
> Cc: PG Admin
> Subject: Re: [ADMIN] initdb fails on AIX
> 
> CS DBA <cs_dba@consistentstate.com> writes:
> > On 08/10/2011 01:16 PM, Tom Lane wrote:
> >> This means that initdb tried to execute "postgres -V" and didn't get
> any
> >> output.  What happens when you try that directly?
> 
> > See below.  One oddity, if I compile without the --with-openssl flag
> > (for the configure command) then it works fine.
> 
> > exec(): 0509-036 Cannot load program ./postgres because of the
> following
> > errors:
> >          0509-150   Dependent module libcrypto.a(libcrypto.so.0.9.7)
> > could not be loaded.
> >          0509-022 Cannot load module libcrypto.a(libcrypto.so.0.9.7).
> >          0509-026 System error: A file or directory in the path name
> > does not exist.
> 
> Well, yeah.  It looks like there is something pretty broken about your
> openssl installation.  At the very least you need a LD_LIBRARY_PATH (or
> local equivalent) pointing to wherever libcrypto.so is hiding ... but
> a reasonable installation of openssl should have taken care of that for
> you.  Possibly you could build postgres with an rpath (or local
> equivalent) pointing to openssl's library directory.

I used to have all sorts of problems with openssl on AIX (not just Postgres, but other packages I tried building with it).  We had to build our own version to get it working with pretty much anything.

Brad.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2011-08-11 12:50 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-08-10 19:08 initdb fails on AIX CS DBA <cs_dba@consistentstate.com>
2011-08-10 19:16 ` Tom Lane <tgl@sss.pgh.pa.us>
2011-08-10 20:14   ` CS DBA <cs_dba@consistentstate.com>
2011-08-10 20:22     ` Tom Lane <tgl@sss.pgh.pa.us>
2011-08-10 20:26       ` CS DBA <cs_dba@consistentstate.com>
2011-08-11 12:50       ` Nicholson, Brad (Toronto, ON, CA) <bnicholson@hp.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox