pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed"postgres" is needed by initdb but was not found
14+ messages / 9 participants
[nested] [flat]
* "postgres" is needed by initdb but was not found
@ 2011-04-18 18:42 H S <aras_h1988@yahoo.com>
0 siblings, 2 replies; 14+ messages in thread
From: H S @ 2011-04-18 18:42 UTC (permalink / raw)
To: pgsql-admin; pgsql novice <pgsql-novice@postgresql.org>
[postgres@localhost bin]$ ./initdb --enable-selinux -D /opt/sepgsql/
The program "postgres" is needed by initdb but was not found in the
same directory as "/usr/local/pgsql/bin/initdb".
Check your installation.
What should I do to fix the problem?
sara
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: "postgres" is needed by initdb but was not found
@ 2011-04-18 21:51 raghu ram <raghuchennuru@gmail.com>
parent: H S <aras_h1988@yahoo.com>
1 sibling, 0 replies; 14+ messages in thread
From: raghu ram @ 2011-04-18 21:51 UTC (permalink / raw)
To: H S <aras_h1988@yahoo.com>; +Cc: pgsql-admin; pgsql novice <pgsql-novice@postgresql.org>
On Tue, Apr 19, 2011 at 12:12 AM, H S <aras_h1988@yahoo.com> wrote:
> [postgres@localhost bin]$ ./initdb --enable-selinux -D /opt/sepgsql/
> The program "postgres" is needed by initdb but was not found in the
> same directory as "/usr/local/pgsql/bin/initdb".
> Check your installation.
>
> What should I do to fix the problem?
>
>
Ok, to know where your installation location is, try this command.
which initdb
-- Raghu
> sara
>
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: "postgres" is needed by initdb but was not found
@ 2011-04-18 21:55 Kevin Grittner <Kevin.Grittner@wicourts.gov>
parent: H S <aras_h1988@yahoo.com>
1 sibling, 2 replies; 14+ messages in thread
From: Kevin Grittner @ 2011-04-18 21:55 UTC (permalink / raw)
To: pgsql-admin; pgsql novice <pgsql-novice@postgresql.org>; H S <aras_h1988@yahoo.com>
H S <aras_h1988@yahoo.com> wrote:
> [postgres@localhost bin]$ ./initdb --enable-selinux -D
> /opt/sepgsql/
> The program "postgres" is needed by initdb but was not found in
> the same directory as "/usr/local/pgsql/bin/initdb".
> Check your installation.
>
> What should I do to fix the problem?
Did you run ./initidb with /usr/local/pgsql/bin/ as your current
directory?
Is there a postgres executable in that directory?
Also, what version? Where did you get it? How did you install it?
What's your OS?
-Kevin
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: "postgres" is needed by initdb but was not found
@ 2011-04-19 05:09 Muruganand Karthikeyan <muruthegun@gmail.com>
parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
1 sibling, 1 reply; 14+ messages in thread
From: Muruganand Karthikeyan @ 2011-04-19 05:09 UTC (permalink / raw)
To: ; +Cc: pgsql-admin; pgsql novice <pgsql-novice@postgresql.org>
Anyone know where I can get the source for postgres 8.4.5 ?? I've been
looking in the download mirrors and all I see is version 8.4.6/8.4.7
and so on.... what about version 8.4.5??? If all else fails, is there
a way to do a checkout of the source for v8.4.5?
Thanks,
-Muruganand
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: "postgres" is needed by initdb but was not found
@ 2011-04-19 08:53 H S <aras_h1988@yahoo.com>
0 siblings, 0 replies; 14+ messages in thread
From: H S @ 2011-04-19 08:53 UTC (permalink / raw)
To: pgsql-admin
Did you run ./initidb with /usr/local/pgsql/bin/ as your current
directory?
Is there a postgres executable in that directory? @: yes there is a postgres in that directory.
Also, what version? @: 9.0.1
Where did you get it?@: by compiling the source code.
How did you install it? @: above.
What's your OS? @ fedora 14
*
-Kevin
sara
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: [ADMIN] "postgres" is needed by initdb but was not found
@ 2011-04-19 12:00 Grzegorz Szpetkowski <gszpetkowski@gmail.com>
parent: Muruganand Karthikeyan <muruthegun@gmail.com>
0 siblings, 0 replies; 14+ messages in thread
From: Grzegorz Szpetkowski @ 2011-04-19 12:00 UTC (permalink / raw)
To: Muruganand Karthikeyan <muruthegun@gmail.com>; +Cc: pgsql-novice@postgresql.org
Look at ftp://ftp-archives.postgresql.org/pub/source/v8.4.5/
http://postgresql.1045698.n5.nabble.com/Where-is-the-source-code-for-v8-4-5-td4312500.html
Grzegorz Sz.
2011/4/19 Muruganand Karthikeyan <muruthegun@gmail.com>:
> Anyone know where I can get the source for postgres 8.4.5 ?? I've been
> looking in the download mirrors and all I see is version 8.4.6/8.4.7
> and so on.... what about version 8.4.5??? If all else fails, is there
> a way to do a checkout of the source for v8.4.5?
>
> Thanks,
> -Muruganand
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: "postgres" is needed by initdb but was not found
@ 2018-07-06 17:46 mohammed shahid <mohammedshahid.r@gmail.com>
parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
1 sibling, 1 reply; 14+ messages in thread
From: mohammed shahid @ 2018-07-06 17:46 UTC (permalink / raw)
To: pgsql-admin
Hi Kevin,
I am new to this forum, but even i am facing this issue as reported where i
get the below error.
sudo -u shahid ./pg_ctl -D /root/pgsql10x/data/ initdb
invalid binary "/root/pgsql10x/bin/pg_ctl"
invalid binary "/root/pgsql10x/bin/pg_ctl"
invalid binary "/root/pgsql10x/bin/pg_ctl"
The program "initdb" is needed by pg_ctl but was not found in the
same directory as "pg_ctl".
Check your installation.
FYI ,
I am trying to run this from root.
As reported by H S, even i have built from the source. I am trying version
10. on CentOS7.
I downloaded direct from postgres site.
I am not facing this problem when i run as non-root user.
I have all the files in the bin directory, as shared below,
-rwxrwxrwx. 1 shahid shahid 7604946 Jul 6 17:19 postgres
lrwxrwxrwx. 1 shahid shahid 8 Jul 6 17:19 postmaster -> postgres
-rwxr-xr-x. 1 shahid shahid 908965 Jul 6 17:19 ecpg
-rwxr-xr-x. 1 shahid shahid 128690 Jul 6 17:19 initdb
-rwxr-xr-x. 1 shahid shahid 30548 Jul 6 17:19 pg_archivecleanup
-rwxr-xr-x. 1 shahid shahid 112608 Jul 6 17:19 pg_basebackup
-rwxr-xr-x. 1 shahid shahid 71241 Jul 6 17:19 pg_receivewal
-rwxr-xr-x. 1 shahid shahid 72771 Jul 6 17:19 pg_recvlogical
-rwxr-xr-x. 1 shahid shahid 30009 Jul 6 17:19 pg_config
-rwxr-xr-x. 1 shahid shahid 39920 Jul 6 17:19 pg_controldata
-rwxr-xr-x. 1 shahid shahid 58438 Jul 6 17:19 pg_ctl
-rwxr-xr-x. 1 shahid shahid 400623 Jul 6 17:19 pg_dump
-rwxr-xr-x. 1 shahid shahid 164991 Jul 6 17:19 pg_restore
-rwxr-xr-x. 1 shahid shahid 97686 Jul 6 17:19 pg_dumpall
-rwxr-xr-x. 1 shahid shahid 49138 Jul 6 17:19 pg_resetwal
-rwxr-xr-x. 1 shahid shahid 88205 Jul 6 17:19 pg_rewind
-rwxr-xr-x. 1 shahid shahid 31798 Jul 6 17:19 pg_test_fsync
-rwxr-xr-x. 1 shahid shahid 26337 Jul 6 17:19 pg_test_timing
-rwxr-xr-x. 1 shahid shahid 130515 Jul 6 17:19 pg_upgrade
-rwxr-xr-x. 1 shahid shahid 86270 Jul 6 17:19 pg_waldump
-rwxr-xr-x. 1 shahid shahid 141273 Jul 6 17:19 pgbench
-rwxr-xr-x. 1 shahid shahid 454216 Jul 6 17:19 psql
-rwxr-xr-x. 1 shahid shahid 60635 Jul 6 17:19 createdb
-rwxr-xr-x. 1 shahid shahid 56335 Jul 6 17:19 dropdb
-rwxr-xr-x. 1 shahid shahid 64416 Jul 6 17:19 createuser
-rwxr-xr-x. 1 shahid shahid 56305 Jul 6 17:19 dropuser
-rwxr-xr-x. 1 shahid shahid 61135 Jul 6 17:19 clusterdb
-rwxr-xr-x. 1 shahid shahid 68735 Jul 6 17:19 vacuumdb
-rwxr-xr-x. 1 shahid shahid 64047 Jul 6 17:19 reindexdb
-rwxr-xr-x. 1 shahid shahid 59104 Jul 6 17:19 pg_isready
Thanks
Shahid
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: "postgres" is needed by initdb but was not found
@ 2018-07-07 05:12 Shreeyansh Dba <shreeyansh2014@gmail.com>
parent: mohammed shahid <mohammedshahid.r@gmail.com>
0 siblings, 1 reply; 14+ messages in thread
From: Shreeyansh Dba @ 2018-07-07 05:12 UTC (permalink / raw)
To: mohammed shahid <mohammedshahid.r@gmail.com>; +Cc: pgsql-admin
Hi Mohammed,
As I suspect that you are trying to create a cluster but pg_ctl is a not a
valid option to create a cluster.
You can use initdb option for creating a cluster...
Hope this helps.
<http://www.shreeyansh.com;
On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid <mohammedshahid.r@gmail.com
> wrote:
> Hi Kevin,
>
> I am new to this forum, but even i am facing this issue as reported where i
> get the below error.
>
> sudo -u shahid ./pg_ctl -D /root/pgsql10x/data/ initdb
> invalid binary "/root/pgsql10x/bin/pg_ctl"
> invalid binary "/root/pgsql10x/bin/pg_ctl"
> invalid binary "/root/pgsql10x/bin/pg_ctl"
> The program "initdb" is needed by pg_ctl but was not found in the
> same directory as "pg_ctl".
> Check your installation.
>
> FYI ,
> I am trying to run this from root.
> As reported by H S, even i have built from the source. I am trying version
> 10. on CentOS7.
> I downloaded direct from postgres site.
> I am not facing this problem when i run as non-root user.
>
> I have all the files in the bin directory, as shared below,
>
> -rwxrwxrwx. 1 shahid shahid 7604946 Jul 6 17:19 postgres
> lrwxrwxrwx. 1 shahid shahid 8 Jul 6 17:19 postmaster -> postgres
> -rwxr-xr-x. 1 shahid shahid 908965 Jul 6 17:19 ecpg
> -rwxr-xr-x. 1 shahid shahid 128690 Jul 6 17:19 initdb
> -rwxr-xr-x. 1 shahid shahid 30548 Jul 6 17:19 pg_archivecleanup
> -rwxr-xr-x. 1 shahid shahid 112608 Jul 6 17:19 pg_basebackup
> -rwxr-xr-x. 1 shahid shahid 71241 Jul 6 17:19 pg_receivewal
> -rwxr-xr-x. 1 shahid shahid 72771 Jul 6 17:19 pg_recvlogical
> -rwxr-xr-x. 1 shahid shahid 30009 Jul 6 17:19 pg_config
> -rwxr-xr-x. 1 shahid shahid 39920 Jul 6 17:19 pg_controldata
> -rwxr-xr-x. 1 shahid shahid 58438 Jul 6 17:19 pg_ctl
> -rwxr-xr-x. 1 shahid shahid 400623 Jul 6 17:19 pg_dump
> -rwxr-xr-x. 1 shahid shahid 164991 Jul 6 17:19 pg_restore
> -rwxr-xr-x. 1 shahid shahid 97686 Jul 6 17:19 pg_dumpall
> -rwxr-xr-x. 1 shahid shahid 49138 Jul 6 17:19 pg_resetwal
> -rwxr-xr-x. 1 shahid shahid 88205 Jul 6 17:19 pg_rewind
> -rwxr-xr-x. 1 shahid shahid 31798 Jul 6 17:19 pg_test_fsync
> -rwxr-xr-x. 1 shahid shahid 26337 Jul 6 17:19 pg_test_timing
> -rwxr-xr-x. 1 shahid shahid 130515 Jul 6 17:19 pg_upgrade
> -rwxr-xr-x. 1 shahid shahid 86270 Jul 6 17:19 pg_waldump
> -rwxr-xr-x. 1 shahid shahid 141273 Jul 6 17:19 pgbench
> -rwxr-xr-x. 1 shahid shahid 454216 Jul 6 17:19 psql
> -rwxr-xr-x. 1 shahid shahid 60635 Jul 6 17:19 createdb
> -rwxr-xr-x. 1 shahid shahid 56335 Jul 6 17:19 dropdb
> -rwxr-xr-x. 1 shahid shahid 64416 Jul 6 17:19 createuser
> -rwxr-xr-x. 1 shahid shahid 56305 Jul 6 17:19 dropuser
> -rwxr-xr-x. 1 shahid shahid 61135 Jul 6 17:19 clusterdb
> -rwxr-xr-x. 1 shahid shahid 68735 Jul 6 17:19 vacuumdb
> -rwxr-xr-x. 1 shahid shahid 64047 Jul 6 17:19 reindexdb
> -rwxr-xr-x. 1 shahid shahid 59104 Jul 6 17:19 pg_isready
>
> Thanks
> Shahid
>
>
>
>
>
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.
> html
>
>
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: "postgres" is needed by initdb but was not found
@ 2018-07-07 05:37 Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>
parent: Shreeyansh Dba <shreeyansh2014@gmail.com>
0 siblings, 1 reply; 14+ messages in thread
From: Mohammed Shahid Nawaz @ 2018-07-07 05:37 UTC (permalink / raw)
To: Shreeyansh Dba <shreeyansh2014@gmail.com>; +Cc: pgsql-admin
Hi Shreeyansh,
Thank you for the feedback.
The problem continues to exist even while using initdb command.
I had been using pg_ctl to initiate a db in my earlier version 9.6.3 as
well.
The command goes as follows, and its working on non-root user login for the
same build version 10.4.
su - postgres -c '/root/pgsql10x/bin/pg_ctl -D /root/pgsql10x/data/ initdb'
Thanks,
Mohammed Shahid Nawaz
On Sat 7 Jul, 2018, 10:42 AM Shreeyansh Dba, <shreeyansh2014@gmail.com>
wrote:
> Hi Mohammed,
>
> As I suspect that you are trying to create a cluster but pg_ctl is a not a
> valid option to create a cluster.
>
> You can use initdb option for creating a cluster...
>
> Hope this helps.
>
>
> <http://www.shreeyansh.com;
>
> On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid <
> mohammedshahid.r@gmail.com> wrote:
>
>> Hi Kevin,
>>
>> I am new to this forum, but even i am facing this issue as reported where
>> i
>> get the below error.
>>
>> sudo -u shahid ./pg_ctl -D /root/pgsql10x/data/ initdb
>> invalid binary "/root/pgsql10x/bin/pg_ctl"
>> invalid binary "/root/pgsql10x/bin/pg_ctl"
>> invalid binary "/root/pgsql10x/bin/pg_ctl"
>> The program "initdb" is needed by pg_ctl but was not found in the
>> same directory as "pg_ctl".
>> Check your installation.
>>
>> FYI ,
>> I am trying to run this from root.
>> As reported by H S, even i have built from the source. I am trying version
>> 10. on CentOS7.
>> I downloaded direct from postgres site.
>> I am not facing this problem when i run as non-root user.
>>
>> I have all the files in the bin directory, as shared below,
>>
>> -rwxrwxrwx. 1 shahid shahid 7604946 Jul 6 17:19 postgres
>> lrwxrwxrwx. 1 shahid shahid 8 Jul 6 17:19 postmaster -> postgres
>> -rwxr-xr-x. 1 shahid shahid 908965 Jul 6 17:19 ecpg
>> -rwxr-xr-x. 1 shahid shahid 128690 Jul 6 17:19 initdb
>> -rwxr-xr-x. 1 shahid shahid 30548 Jul 6 17:19 pg_archivecleanup
>> -rwxr-xr-x. 1 shahid shahid 112608 Jul 6 17:19 pg_basebackup
>> -rwxr-xr-x. 1 shahid shahid 71241 Jul 6 17:19 pg_receivewal
>> -rwxr-xr-x. 1 shahid shahid 72771 Jul 6 17:19 pg_recvlogical
>> -rwxr-xr-x. 1 shahid shahid 30009 Jul 6 17:19 pg_config
>> -rwxr-xr-x. 1 shahid shahid 39920 Jul 6 17:19 pg_controldata
>> -rwxr-xr-x. 1 shahid shahid 58438 Jul 6 17:19 pg_ctl
>> -rwxr-xr-x. 1 shahid shahid 400623 Jul 6 17:19 pg_dump
>> -rwxr-xr-x. 1 shahid shahid 164991 Jul 6 17:19 pg_restore
>> -rwxr-xr-x. 1 shahid shahid 97686 Jul 6 17:19 pg_dumpall
>> -rwxr-xr-x. 1 shahid shahid 49138 Jul 6 17:19 pg_resetwal
>> -rwxr-xr-x. 1 shahid shahid 88205 Jul 6 17:19 pg_rewind
>> -rwxr-xr-x. 1 shahid shahid 31798 Jul 6 17:19 pg_test_fsync
>> -rwxr-xr-x. 1 shahid shahid 26337 Jul 6 17:19 pg_test_timing
>> -rwxr-xr-x. 1 shahid shahid 130515 Jul 6 17:19 pg_upgrade
>> -rwxr-xr-x. 1 shahid shahid 86270 Jul 6 17:19 pg_waldump
>> -rwxr-xr-x. 1 shahid shahid 141273 Jul 6 17:19 pgbench
>> -rwxr-xr-x. 1 shahid shahid 454216 Jul 6 17:19 psql
>> -rwxr-xr-x. 1 shahid shahid 60635 Jul 6 17:19 createdb
>> -rwxr-xr-x. 1 shahid shahid 56335 Jul 6 17:19 dropdb
>> -rwxr-xr-x. 1 shahid shahid 64416 Jul 6 17:19 createuser
>> -rwxr-xr-x. 1 shahid shahid 56305 Jul 6 17:19 dropuser
>> -rwxr-xr-x. 1 shahid shahid 61135 Jul 6 17:19 clusterdb
>> -rwxr-xr-x. 1 shahid shahid 68735 Jul 6 17:19 vacuumdb
>> -rwxr-xr-x. 1 shahid shahid 64047 Jul 6 17:19 reindexdb
>> -rwxr-xr-x. 1 shahid shahid 59104 Jul 6 17:19 pg_isready
>>
>> Thanks
>> Shahid
>>
>>
>>
>>
>>
>> --
>> Sent from:
>> http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
>>
>>
>
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: "postgres" is needed by initdb but was not found
@ 2018-07-08 10:08 Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
parent: Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>
0 siblings, 1 reply; 14+ messages in thread
From: Mark Kirkwood @ 2018-07-08 10:08 UTC (permalink / raw)
To: Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>; Shreeyansh Dba <shreeyansh2014@gmail.com>; +Cc: pgsql-admin
The message 'invalid binary' suggests the wrong architecture binaries
are installed (e.g 32 bit on 64 bit machine or vice versa). if you were
missing the initdb binary your would get a different message (e.g):
The The program "initdb" is needed by pg_ctl but was not found in the
same directory as "/usr/local/bin/pg_ctl".
regards
Mark
On 07/07/18 17:37, Mohammed Shahid Nawaz wrote:
> Hi Shreeyansh,
> Thank you for the feedback.
> The problem continues to exist even while using initdb command.
>
> I had been using pg_ctl to initiate a db in my earlier version 9.6.3
> as well.
>
> The command goes as follows, and its working on non-root user login
> for the same build version 10.4.
>
> su - postgres -c '/root/pgsql10x/bin/pg_ctl -D /root/pgsql10x/data/
> initdb'
>
>
> Thanks,
> Mohammed Shahid Nawaz
>
> On Sat 7 Jul, 2018, 10:42 AM Shreeyansh Dba, <shreeyansh2014@gmail.com
> <mailto:shreeyansh2014@gmail.com>> wrote:
>
> Hi Mohammed,
>
> As I suspect that you are trying to create a cluster but pg_ctl is
> a not a valid option to create a cluster.
>
> You can use initdb option for creating a cluster...
>
> Hope this helps.
>
>
> <http://www.shreeyansh.com;
>
> On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid
> <mohammedshahid.r@gmail.com <mailto:mohammedshahid.r@gmail.com>>
> wrote:
>
> Hi Kevin,
>
> I am new to this forum, but even i am facing this issue as
> reported where i
> get the below error.
>
> sudo -u shahid ./pg_ctl -D /root/pgsql10x/data/ initdb
> invalid binary "/root/pgsql10x/bin/pg_ctl"
> invalid binary "/root/pgsql10x/bin/pg_ctl"
> invalid binary "/root/pgsql10x/bin/pg_ctl"
> The program "initdb" is needed by pg_ctl but was not found in the
> same directory as "pg_ctl".
> Check your installation.
>
> FYI ,
> I am trying to run this from root.
> As reported by H S, even i have built from the source. I am
> trying version
> 10. on CentOS7.
> I downloaded direct from postgres site.
> I am not facing this problem when i run as non-root user.
>
> I have all the files in the bin directory, as shared below,
>
> -rwxrwxrwx. 1 shahid shahid 7604946 Jul 6 17:19 postgres
> lrwxrwxrwx. 1 shahid shahid 8 Jul 6 17:19 postmaster ->
> postgres
> -rwxr-xr-x. 1 shahid shahid 908965 Jul 6 17:19 ecpg
> -rwxr-xr-x. 1 shahid shahid 128690 Jul 6 17:19 initdb
> -rwxr-xr-x. 1 shahid shahid 30548 Jul 6 17:19 pg_archivecleanup
> -rwxr-xr-x. 1 shahid shahid 112608 Jul 6 17:19 pg_basebackup
> -rwxr-xr-x. 1 shahid shahid 71241 Jul 6 17:19 pg_receivewal
> -rwxr-xr-x. 1 shahid shahid 72771 Jul 6 17:19 pg_recvlogical
> -rwxr-xr-x. 1 shahid shahid 30009 Jul 6 17:19 pg_config
> -rwxr-xr-x. 1 shahid shahid 39920 Jul 6 17:19 pg_controldata
> -rwxr-xr-x. 1 shahid shahid 58438 Jul 6 17:19 pg_ctl
> -rwxr-xr-x. 1 shahid shahid 400623 Jul 6 17:19 pg_dump
> -rwxr-xr-x. 1 shahid shahid 164991 Jul 6 17:19 pg_restore
> -rwxr-xr-x. 1 shahid shahid 97686 Jul 6 17:19 pg_dumpall
> -rwxr-xr-x. 1 shahid shahid 49138 Jul 6 17:19 pg_resetwal
> -rwxr-xr-x. 1 shahid shahid 88205 Jul 6 17:19 pg_rewind
> -rwxr-xr-x. 1 shahid shahid 31798 Jul 6 17:19 pg_test_fsync
> -rwxr-xr-x. 1 shahid shahid 26337 Jul 6 17:19 pg_test_timing
> -rwxr-xr-x. 1 shahid shahid 130515 Jul 6 17:19 pg_upgrade
> -rwxr-xr-x. 1 shahid shahid 86270 Jul 6 17:19 pg_waldump
> -rwxr-xr-x. 1 shahid shahid 141273 Jul 6 17:19 pgbench
> -rwxr-xr-x. 1 shahid shahid 454216 Jul 6 17:19 psql
> -rwxr-xr-x. 1 shahid shahid 60635 Jul 6 17:19 createdb
> -rwxr-xr-x. 1 shahid shahid 56335 Jul 6 17:19 dropdb
> -rwxr-xr-x. 1 shahid shahid 64416 Jul 6 17:19 createuser
> -rwxr-xr-x. 1 shahid shahid 56305 Jul 6 17:19 dropuser
> -rwxr-xr-x. 1 shahid shahid 61135 Jul 6 17:19 clusterdb
> -rwxr-xr-x. 1 shahid shahid 68735 Jul 6 17:19 vacuumdb
> -rwxr-xr-x. 1 shahid shahid 64047 Jul 6 17:19 reindexdb
> -rwxr-xr-x. 1 shahid shahid 59104 Jul 6 17:19 pg_isready
>
> Thanks
> Shahid
>
>
>
>
>
> --
> Sent from:
> http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
>
>
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: "postgres" is needed by initdb but was not found
@ 2018-07-08 11:21 Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>
parent: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
0 siblings, 1 reply; 14+ messages in thread
From: Mohammed Shahid Nawaz @ 2018-07-08 11:21 UTC (permalink / raw)
To: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>; +Cc: Shreeyansh Dba <shreeyansh2014@gmail.com>; pgsql-admin
Hi Mark,
I have built the source code on 64bit and trying to run on 64bit system.
The same build works on 64bit non-root user login of the same system.
Thanks,
Mohammed Shahid Nawaz
On Sun 8 Jul, 2018, 3:38 PM Mark Kirkwood, <mark.kirkwood@catalyst.net.nz>
wrote:
> The message 'invalid binary' suggests the wrong architecture binaries
> are installed (e.g 32 bit on 64 bit machine or vice versa). if you were
> missing the initdb binary your would get a different message (e.g):
>
> The The program "initdb" is needed by pg_ctl but was not found in the
> same directory as "/usr/local/bin/pg_ctl".
>
> regards
> Mark
>
> On 07/07/18 17:37, Mohammed Shahid Nawaz wrote:
> > Hi Shreeyansh,
> > Thank you for the feedback.
> > The problem continues to exist even while using initdb command.
> >
> > I had been using pg_ctl to initiate a db in my earlier version 9.6.3
> > as well.
> >
> > The command goes as follows, and its working on non-root user login
> > for the same build version 10.4.
> >
> > su - postgres -c '/root/pgsql10x/bin/pg_ctl -D /root/pgsql10x/data/
> > initdb'
> >
> >
> > Thanks,
> > Mohammed Shahid Nawaz
> >
> > On Sat 7 Jul, 2018, 10:42 AM Shreeyansh Dba, <shreeyansh2014@gmail.com
> > <mailto:shreeyansh2014@gmail.com>> wrote:
> >
> > Hi Mohammed,
> >
> > As I suspect that you are trying to create a cluster but pg_ctl is
> > a not a valid option to create a cluster.
> >
> > You can use initdb option for creating a cluster...
> >
> > Hope this helps.
> >
> >
> > <http://www.shreeyansh.com;
> >
> > On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid
> > <mohammedshahid.r@gmail.com <mailto:mohammedshahid.r@gmail.com>>
> > wrote:
> >
> > Hi Kevin,
> >
> > I am new to this forum, but even i am facing this issue as
> > reported where i
> > get the below error.
> >
> > sudo -u shahid ./pg_ctl -D /root/pgsql10x/data/ initdb
> > invalid binary "/root/pgsql10x/bin/pg_ctl"
> > invalid binary "/root/pgsql10x/bin/pg_ctl"
> > invalid binary "/root/pgsql10x/bin/pg_ctl"
> > The program "initdb" is needed by pg_ctl but was not found in the
> > same directory as "pg_ctl".
> > Check your installation.
> >
> > FYI ,
> > I am trying to run this from root.
> > As reported by H S, even i have built from the source. I am
> > trying version
> > 10. on CentOS7.
> > I downloaded direct from postgres site.
> > I am not facing this problem when i run as non-root user.
> >
> > I have all the files in the bin directory, as shared below,
> >
> > -rwxrwxrwx. 1 shahid shahid 7604946 Jul 6 17:19 postgres
> > lrwxrwxrwx. 1 shahid shahid 8 Jul 6 17:19 postmaster ->
> > postgres
> > -rwxr-xr-x. 1 shahid shahid 908965 Jul 6 17:19 ecpg
> > -rwxr-xr-x. 1 shahid shahid 128690 Jul 6 17:19 initdb
> > -rwxr-xr-x. 1 shahid shahid 30548 Jul 6 17:19
> pg_archivecleanup
> > -rwxr-xr-x. 1 shahid shahid 112608 Jul 6 17:19 pg_basebackup
> > -rwxr-xr-x. 1 shahid shahid 71241 Jul 6 17:19 pg_receivewal
> > -rwxr-xr-x. 1 shahid shahid 72771 Jul 6 17:19 pg_recvlogical
> > -rwxr-xr-x. 1 shahid shahid 30009 Jul 6 17:19 pg_config
> > -rwxr-xr-x. 1 shahid shahid 39920 Jul 6 17:19 pg_controldata
> > -rwxr-xr-x. 1 shahid shahid 58438 Jul 6 17:19 pg_ctl
> > -rwxr-xr-x. 1 shahid shahid 400623 Jul 6 17:19 pg_dump
> > -rwxr-xr-x. 1 shahid shahid 164991 Jul 6 17:19 pg_restore
> > -rwxr-xr-x. 1 shahid shahid 97686 Jul 6 17:19 pg_dumpall
> > -rwxr-xr-x. 1 shahid shahid 49138 Jul 6 17:19 pg_resetwal
> > -rwxr-xr-x. 1 shahid shahid 88205 Jul 6 17:19 pg_rewind
> > -rwxr-xr-x. 1 shahid shahid 31798 Jul 6 17:19 pg_test_fsync
> > -rwxr-xr-x. 1 shahid shahid 26337 Jul 6 17:19 pg_test_timing
> > -rwxr-xr-x. 1 shahid shahid 130515 Jul 6 17:19 pg_upgrade
> > -rwxr-xr-x. 1 shahid shahid 86270 Jul 6 17:19 pg_waldump
> > -rwxr-xr-x. 1 shahid shahid 141273 Jul 6 17:19 pgbench
> > -rwxr-xr-x. 1 shahid shahid 454216 Jul 6 17:19 psql
> > -rwxr-xr-x. 1 shahid shahid 60635 Jul 6 17:19 createdb
> > -rwxr-xr-x. 1 shahid shahid 56335 Jul 6 17:19 dropdb
> > -rwxr-xr-x. 1 shahid shahid 64416 Jul 6 17:19 createuser
> > -rwxr-xr-x. 1 shahid shahid 56305 Jul 6 17:19 dropuser
> > -rwxr-xr-x. 1 shahid shahid 61135 Jul 6 17:19 clusterdb
> > -rwxr-xr-x. 1 shahid shahid 68735 Jul 6 17:19 vacuumdb
> > -rwxr-xr-x. 1 shahid shahid 64047 Jul 6 17:19 reindexdb
> > -rwxr-xr-x. 1 shahid shahid 59104 Jul 6 17:19 pg_isready
> >
> > Thanks
> > Shahid
> >
> >
> >
> >
> >
> > --
> > Sent from:
> > http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
> >
> >
>
>
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: "postgres" is needed by initdb but was not found
@ 2018-07-08 12:11 Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
parent: Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>
0 siblings, 1 reply; 14+ messages in thread
From: Mark Kirkwood @ 2018-07-08 12:11 UTC (permalink / raw)
To: Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>; +Cc: Shreeyansh Dba <shreeyansh2014@gmail.com>; pgsql-admin
Hmm - Postgres will refuse to run as the root user (security reasons).
On 08/07/18 23:21, Mohammed Shahid Nawaz wrote:
> Hi Mark,
> I have built the source code on 64bit and trying to run on 64bit system.
>
> The same build works on 64bit non-root user login of the same system.
>
>
> Thanks,
> Mohammed Shahid Nawaz
>
> On Sun 8 Jul, 2018, 3:38 PM Mark Kirkwood,
> <mark.kirkwood@catalyst.net.nz <mailto:mark.kirkwood@catalyst.net.nz>>
> wrote:
>
> The message 'invalid binary' suggests the wrong architecture binaries
> are installed (e.g 32 bit on 64 bit machine or vice versa). if you
> were
> missing the initdb binary your would get a different message (e.g):
>
> The The program "initdb" is needed by pg_ctl but was not found in the
> same directory as "/usr/local/bin/pg_ctl".
>
> regards
> Mark
>
> On 07/07/18 17:37, Mohammed Shahid Nawaz wrote:
> > Hi Shreeyansh,
> > Thank you for the feedback.
> > The problem continues to exist even while using initdb command.
> >
> > I had been using pg_ctl to initiate a db in my earlier version
> 9.6.3
> > as well.
> >
> > The command goes as follows, and its working on non-root user login
> > for the same build version 10.4.
> >
> > su - postgres -c '/root/pgsql10x/bin/pg_ctl -D /root/pgsql10x/data/
> > initdb'
> >
> >
> > Thanks,
> > Mohammed Shahid Nawaz
> >
> > On Sat 7 Jul, 2018, 10:42 AM Shreeyansh Dba,
> <shreeyansh2014@gmail.com <mailto:shreeyansh2014@gmail.com>
> > <mailto:shreeyansh2014@gmail.com
> <mailto:shreeyansh2014@gmail.com>>> wrote:
> >
> > Hi Mohammed,
> >
> > As I suspect that you are trying to create a cluster but
> pg_ctl is
> > a not a valid option to create a cluster.
> >
> > You can use initdb option for creating a cluster...
> >
> > Hope this helps.
> >
> >
> > <http://www.shreeyansh.com;
> >
> > On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid
> > <mohammedshahid.r@gmail.com
> <mailto:mohammedshahid.r@gmail.com>
> <mailto:mohammedshahid.r@gmail.com
> <mailto:mohammedshahid.r@gmail.com>>>
> > wrote:
> >
> > Hi Kevin,
> >
> > I am new to this forum, but even i am facing this issue as
> > reported where i
> > get the below error.
> >
> > sudo -u shahid ./pg_ctl -D /root/pgsql10x/data/ initdb
> > invalid binary "/root/pgsql10x/bin/pg_ctl"
> > invalid binary "/root/pgsql10x/bin/pg_ctl"
> > invalid binary "/root/pgsql10x/bin/pg_ctl"
> > The program "initdb" is needed by pg_ctl but was not
> found in the
> > same directory as "pg_ctl".
> > Check your installation.
> >
> > FYI ,
> > I am trying to run this from root.
> > As reported by H S, even i have built from the source. I am
> > trying version
> > 10. on CentOS7.
> > I downloaded direct from postgres site.
> > I am not facing this problem when i run as non-root user.
> >
> > I have all the files in the bin directory, as shared below,
> >
> > -rwxrwxrwx. 1 shahid shahid 7604946 Jul 6 17:19 postgres
> > lrwxrwxrwx. 1 shahid shahid 8 Jul 6 17:19
> postmaster ->
> > postgres
> > -rwxr-xr-x. 1 shahid shahid 908965 Jul 6 17:19 ecpg
> > -rwxr-xr-x. 1 shahid shahid 128690 Jul 6 17:19 initdb
> > -rwxr-xr-x. 1 shahid shahid 30548 Jul 6 17:19
> pg_archivecleanup
> > -rwxr-xr-x. 1 shahid shahid 112608 Jul 6 17:19
> pg_basebackup
> > -rwxr-xr-x. 1 shahid shahid 71241 Jul 6 17:19
> pg_receivewal
> > -rwxr-xr-x. 1 shahid shahid 72771 Jul 6 17:19
> pg_recvlogical
> > -rwxr-xr-x. 1 shahid shahid 30009 Jul 6 17:19 pg_config
> > -rwxr-xr-x. 1 shahid shahid 39920 Jul 6 17:19
> pg_controldata
> > -rwxr-xr-x. 1 shahid shahid 58438 Jul 6 17:19 pg_ctl
> > -rwxr-xr-x. 1 shahid shahid 400623 Jul 6 17:19 pg_dump
> > -rwxr-xr-x. 1 shahid shahid 164991 Jul 6 17:19 pg_restore
> > -rwxr-xr-x. 1 shahid shahid 97686 Jul 6 17:19 pg_dumpall
> > -rwxr-xr-x. 1 shahid shahid 49138 Jul 6 17:19 pg_resetwal
> > -rwxr-xr-x. 1 shahid shahid 88205 Jul 6 17:19 pg_rewind
> > -rwxr-xr-x. 1 shahid shahid 31798 Jul 6 17:19
> pg_test_fsync
> > -rwxr-xr-x. 1 shahid shahid 26337 Jul 6 17:19
> pg_test_timing
> > -rwxr-xr-x. 1 shahid shahid 130515 Jul 6 17:19 pg_upgrade
> > -rwxr-xr-x. 1 shahid shahid 86270 Jul 6 17:19 pg_waldump
> > -rwxr-xr-x. 1 shahid shahid 141273 Jul 6 17:19 pgbench
> > -rwxr-xr-x. 1 shahid shahid 454216 Jul 6 17:19 psql
> > -rwxr-xr-x. 1 shahid shahid 60635 Jul 6 17:19 createdb
> > -rwxr-xr-x. 1 shahid shahid 56335 Jul 6 17:19 dropdb
> > -rwxr-xr-x. 1 shahid shahid 64416 Jul 6 17:19 createuser
> > -rwxr-xr-x. 1 shahid shahid 56305 Jul 6 17:19 dropuser
> > -rwxr-xr-x. 1 shahid shahid 61135 Jul 6 17:19 clusterdb
> > -rwxr-xr-x. 1 shahid shahid 68735 Jul 6 17:19 vacuumdb
> > -rwxr-xr-x. 1 shahid shahid 64047 Jul 6 17:19 reindexdb
> > -rwxr-xr-x. 1 shahid shahid 59104 Jul 6 17:19 pg_isready
> >
> > Thanks
> > Shahid
> >
> >
> >
> >
> >
> > --
> > Sent from:
> > http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
> >
> >
>
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: "postgres" is needed by initdb but was not found
@ 2018-07-08 12:17 Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>
parent: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
0 siblings, 1 reply; 14+ messages in thread
From: Mohammed Shahid Nawaz @ 2018-07-08 12:17 UTC (permalink / raw)
To: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>; +Cc: Shreeyansh Dba <shreeyansh2014@gmail.com>; pgsql-admin
Hi Mark,
Hence we run using sudo command or with 'su' from the root.
I have been running this command through from admin for version 9.6.3., it
works.
Thanks
Mohammed Shahid Nawaz
On Sun 8 Jul, 2018, 5:42 PM Mark Kirkwood, <mark.kirkwood@catalyst.net.nz>
wrote:
> Hmm - Postgres will refuse to run as the root user (security reasons).
>
>
> On 08/07/18 23:21, Mohammed Shahid Nawaz wrote:
> > Hi Mark,
> > I have built the source code on 64bit and trying to run on 64bit system.
> >
> > The same build works on 64bit non-root user login of the same system.
> >
> >
> > Thanks,
> > Mohammed Shahid Nawaz
> >
> > On Sun 8 Jul, 2018, 3:38 PM Mark Kirkwood,
> > <mark.kirkwood@catalyst.net.nz <mailto:mark.kirkwood@catalyst.net.nz>>
> > wrote:
> >
> > The message 'invalid binary' suggests the wrong architecture binaries
> > are installed (e.g 32 bit on 64 bit machine or vice versa). if you
> > were
> > missing the initdb binary your would get a different message (e.g):
> >
> > The The program "initdb" is needed by pg_ctl but was not found in the
> > same directory as "/usr/local/bin/pg_ctl".
> >
> > regards
> > Mark
> >
> > On 07/07/18 17:37, Mohammed Shahid Nawaz wrote:
> > > Hi Shreeyansh,
> > > Thank you for the feedback.
> > > The problem continues to exist even while using initdb command.
> > >
> > > I had been using pg_ctl to initiate a db in my earlier version
> > 9.6.3
> > > as well.
> > >
> > > The command goes as follows, and its working on non-root user login
> > > for the same build version 10.4.
> > >
> > > su - postgres -c '/root/pgsql10x/bin/pg_ctl -D /root/pgsql10x/data/
> > > initdb'
> > >
> > >
> > > Thanks,
> > > Mohammed Shahid Nawaz
> > >
> > > On Sat 7 Jul, 2018, 10:42 AM Shreeyansh Dba,
> > <shreeyansh2014@gmail.com <mailto:shreeyansh2014@gmail.com>
> > > <mailto:shreeyansh2014@gmail.com
> > <mailto:shreeyansh2014@gmail.com>>> wrote:
> > >
> > > Hi Mohammed,
> > >
> > > As I suspect that you are trying to create a cluster but
> > pg_ctl is
> > > a not a valid option to create a cluster.
> > >
> > > You can use initdb option for creating a cluster...
> > >
> > > Hope this helps.
> > >
> > >
> > > <http://www.shreeyansh.com;
> > >
> > > On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid
> > > <mohammedshahid.r@gmail.com
> > <mailto:mohammedshahid.r@gmail.com>
> > <mailto:mohammedshahid.r@gmail.com
> > <mailto:mohammedshahid.r@gmail.com>>>
> > > wrote:
> > >
> > > Hi Kevin,
> > >
> > > I am new to this forum, but even i am facing this issue as
> > > reported where i
> > > get the below error.
> > >
> > > sudo -u shahid ./pg_ctl -D /root/pgsql10x/data/ initdb
> > > invalid binary "/root/pgsql10x/bin/pg_ctl"
> > > invalid binary "/root/pgsql10x/bin/pg_ctl"
> > > invalid binary "/root/pgsql10x/bin/pg_ctl"
> > > The program "initdb" is needed by pg_ctl but was not
> > found in the
> > > same directory as "pg_ctl".
> > > Check your installation.
> > >
> > > FYI ,
> > > I am trying to run this from root.
> > > As reported by H S, even i have built from the source. I am
> > > trying version
> > > 10. on CentOS7.
> > > I downloaded direct from postgres site.
> > > I am not facing this problem when i run as non-root user.
> > >
> > > I have all the files in the bin directory, as shared below,
> > >
> > > -rwxrwxrwx. 1 shahid shahid 7604946 Jul 6 17:19 postgres
> > > lrwxrwxrwx. 1 shahid shahid 8 Jul 6 17:19
> > postmaster ->
> > > postgres
> > > -rwxr-xr-x. 1 shahid shahid 908965 Jul 6 17:19 ecpg
> > > -rwxr-xr-x. 1 shahid shahid 128690 Jul 6 17:19 initdb
> > > -rwxr-xr-x. 1 shahid shahid 30548 Jul 6 17:19
> > pg_archivecleanup
> > > -rwxr-xr-x. 1 shahid shahid 112608 Jul 6 17:19
> > pg_basebackup
> > > -rwxr-xr-x. 1 shahid shahid 71241 Jul 6 17:19
> > pg_receivewal
> > > -rwxr-xr-x. 1 shahid shahid 72771 Jul 6 17:19
> > pg_recvlogical
> > > -rwxr-xr-x. 1 shahid shahid 30009 Jul 6 17:19 pg_config
> > > -rwxr-xr-x. 1 shahid shahid 39920 Jul 6 17:19
> > pg_controldata
> > > -rwxr-xr-x. 1 shahid shahid 58438 Jul 6 17:19 pg_ctl
> > > -rwxr-xr-x. 1 shahid shahid 400623 Jul 6 17:19 pg_dump
> > > -rwxr-xr-x. 1 shahid shahid 164991 Jul 6 17:19 pg_restore
> > > -rwxr-xr-x. 1 shahid shahid 97686 Jul 6 17:19 pg_dumpall
> > > -rwxr-xr-x. 1 shahid shahid 49138 Jul 6 17:19
> pg_resetwal
> > > -rwxr-xr-x. 1 shahid shahid 88205 Jul 6 17:19 pg_rewind
> > > -rwxr-xr-x. 1 shahid shahid 31798 Jul 6 17:19
> > pg_test_fsync
> > > -rwxr-xr-x. 1 shahid shahid 26337 Jul 6 17:19
> > pg_test_timing
> > > -rwxr-xr-x. 1 shahid shahid 130515 Jul 6 17:19 pg_upgrade
> > > -rwxr-xr-x. 1 shahid shahid 86270 Jul 6 17:19 pg_waldump
> > > -rwxr-xr-x. 1 shahid shahid 141273 Jul 6 17:19 pgbench
> > > -rwxr-xr-x. 1 shahid shahid 454216 Jul 6 17:19 psql
> > > -rwxr-xr-x. 1 shahid shahid 60635 Jul 6 17:19 createdb
> > > -rwxr-xr-x. 1 shahid shahid 56335 Jul 6 17:19 dropdb
> > > -rwxr-xr-x. 1 shahid shahid 64416 Jul 6 17:19 createuser
> > > -rwxr-xr-x. 1 shahid shahid 56305 Jul 6 17:19 dropuser
> > > -rwxr-xr-x. 1 shahid shahid 61135 Jul 6 17:19 clusterdb
> > > -rwxr-xr-x. 1 shahid shahid 68735 Jul 6 17:19 vacuumdb
> > > -rwxr-xr-x. 1 shahid shahid 64047 Jul 6 17:19 reindexdb
> > > -rwxr-xr-x. 1 shahid shahid 59104 Jul 6 17:19 pg_isready
> > >
> > > Thanks
> > > Shahid
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Sent from:
> > > http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
> > >
> > >
> >
>
>
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: "postgres" is needed by initdb but was not found
@ 2018-07-08 12:22 Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
parent: Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>
0 siblings, 0 replies; 14+ messages in thread
From: Mark Kirkwood @ 2018-07-08 12:22 UTC (permalink / raw)
To: Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>; +Cc: Shreeyansh Dba <shreeyansh2014@gmail.com>; pgsql-admin
Ok - so you are su'ing to a non root user? Should be ok, but
(particularly sudo) does not always set up path etc nicely. See if
things work logging in directly (as the non root) user that is running
the postgres binaries.
On 09/07/18 00:17, Mohammed Shahid Nawaz wrote:
> Hi Mark,
> Hence we run using sudo command or with 'su' from the root.
> I have been running this command through from admin for version
> 9.6.3., it works.
>
> Thanks
> Mohammed Shahid Nawaz
>
> On Sun 8 Jul, 2018, 5:42 PM Mark Kirkwood,
> <mark.kirkwood@catalyst.net.nz <mailto:mark.kirkwood@catalyst.net.nz>>
> wrote:
>
> Hmm - Postgres will refuse to run as the root user (security reasons).
>
>
> On 08/07/18 23:21, Mohammed Shahid Nawaz wrote:
> > Hi Mark,
> > I have built the source code on 64bit and trying to run on 64bit
> system.
> >
> > The same build works on 64bit non-root user login of the same
> system.
> >
> >
> > Thanks,
> > Mohammed Shahid Nawaz
> >
> > On Sun 8 Jul, 2018, 3:38 PM Mark Kirkwood,
> > <mark.kirkwood@catalyst.net.nz
> <mailto:mark.kirkwood@catalyst.net.nz>
> <mailto:mark.kirkwood@catalyst.net.nz
> <mailto:mark.kirkwood@catalyst.net.nz>>>
> > wrote:
> >
> > The message 'invalid binary' suggests the wrong architecture
> binaries
> > are installed (e.g 32 bit on 64 bit machine or vice versa).
> if you
> > were
> > missing the initdb binary your would get a different message
> (e.g):
> >
> > The The program "initdb" is needed by pg_ctl but was not
> found in the
> > same directory as "/usr/local/bin/pg_ctl".
> >
> > regards
> > Mark
> >
> > On 07/07/18 17:37, Mohammed Shahid Nawaz wrote:
> > > Hi Shreeyansh,
> > > Thank you for the feedback.
> > > The problem continues to exist even while using initdb
> command.
> > >
> > > I had been using pg_ctl to initiate a db in my earlier version
> > 9.6.3
> > > as well.
> > >
> > > The command goes as follows, and its working on non-root
> user login
> > > for the same build version 10.4.
> > >
> > > su - postgres -c '/root/pgsql10x/bin/pg_ctl -D
> /root/pgsql10x/data/
> > > initdb'
> > >
> > >
> > > Thanks,
> > > Mohammed Shahid Nawaz
> > >
> > > On Sat 7 Jul, 2018, 10:42 AM Shreeyansh Dba,
> > <shreeyansh2014@gmail.com <mailto:shreeyansh2014@gmail.com>
> <mailto:shreeyansh2014@gmail.com <mailto:shreeyansh2014@gmail.com>>
> > > <mailto:shreeyansh2014@gmail.com
> <mailto:shreeyansh2014@gmail.com>
> > <mailto:shreeyansh2014@gmail.com
> <mailto:shreeyansh2014@gmail.com>>>> wrote:
> > >
> > > Hi Mohammed,
> > >
> > > As I suspect that you are trying to create a cluster but
> > pg_ctl is
> > > a not a valid option to create a cluster.
> > >
> > > You can use initdb option for creating a cluster...
> > >
> > > Hope this helps.
> > >
> > >
> > > <http://www.shreeyansh.com;
> > >
> > > On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid
> > > <mohammedshahid.r@gmail.com
> <mailto:mohammedshahid.r@gmail.com>
> > <mailto:mohammedshahid.r@gmail.com
> <mailto:mohammedshahid.r@gmail.com>>
> > <mailto:mohammedshahid.r@gmail.com
> <mailto:mohammedshahid.r@gmail.com>
> > <mailto:mohammedshahid.r@gmail.com
> <mailto:mohammedshahid.r@gmail.com>>>>
> > > wrote:
> > >
> > > Hi Kevin,
> > >
> > > I am new to this forum, but even i am facing this
> issue as
> > > reported where i
> > > get the below error.
> > >
> > > sudo -u shahid ./pg_ctl -D /root/pgsql10x/data/
> initdb
> > > invalid binary "/root/pgsql10x/bin/pg_ctl"
> > > invalid binary "/root/pgsql10x/bin/pg_ctl"
> > > invalid binary "/root/pgsql10x/bin/pg_ctl"
> > > The program "initdb" is needed by pg_ctl but was not
> > found in the
> > > same directory as "pg_ctl".
> > > Check your installation.
> > >
> > > FYI ,
> > > I am trying to run this from root.
> > > As reported by H S, even i have built from the
> source. I am
> > > trying version
> > > 10. on CentOS7.
> > > I downloaded direct from postgres site.
> > > I am not facing this problem when i run as
> non-root user.
> > >
> > > I have all the files in the bin directory, as
> shared below,
> > >
> > > -rwxrwxrwx. 1 shahid shahid 7604946 Jul 6 17:19
> postgres
> > > lrwxrwxrwx. 1 shahid shahid 8 Jul 6 17:19
> > postmaster ->
> > > postgres
> > > -rwxr-xr-x. 1 shahid shahid 908965 Jul 6 17:19 ecpg
> > > -rwxr-xr-x. 1 shahid shahid 128690 Jul 6 17:19 initdb
> > > -rwxr-xr-x. 1 shahid shahid 30548 Jul 6 17:19
> > pg_archivecleanup
> > > -rwxr-xr-x. 1 shahid shahid 112608 Jul 6 17:19
> > pg_basebackup
> > > -rwxr-xr-x. 1 shahid shahid 71241 Jul 6 17:19
> > pg_receivewal
> > > -rwxr-xr-x. 1 shahid shahid 72771 Jul 6 17:19
> > pg_recvlogical
> > > -rwxr-xr-x. 1 shahid shahid 30009 Jul 6 17:19
> pg_config
> > > -rwxr-xr-x. 1 shahid shahid 39920 Jul 6 17:19
> > pg_controldata
> > > -rwxr-xr-x. 1 shahid shahid 58438 Jul 6 17:19 pg_ctl
> > > -rwxr-xr-x. 1 shahid shahid 400623 Jul 6 17:19
> pg_dump
> > > -rwxr-xr-x. 1 shahid shahid 164991 Jul 6 17:19
> pg_restore
> > > -rwxr-xr-x. 1 shahid shahid 97686 Jul 6 17:19
> pg_dumpall
> > > -rwxr-xr-x. 1 shahid shahid 49138 Jul 6 17:19
> pg_resetwal
> > > -rwxr-xr-x. 1 shahid shahid 88205 Jul 6 17:19
> pg_rewind
> > > -rwxr-xr-x. 1 shahid shahid 31798 Jul 6 17:19
> > pg_test_fsync
> > > -rwxr-xr-x. 1 shahid shahid 26337 Jul 6 17:19
> > pg_test_timing
> > > -rwxr-xr-x. 1 shahid shahid 130515 Jul 6 17:19
> pg_upgrade
> > > -rwxr-xr-x. 1 shahid shahid 86270 Jul 6 17:19
> pg_waldump
> > > -rwxr-xr-x. 1 shahid shahid 141273 Jul 6 17:19
> pgbench
> > > -rwxr-xr-x. 1 shahid shahid 454216 Jul 6 17:19 psql
> > > -rwxr-xr-x. 1 shahid shahid 60635 Jul 6 17:19
> createdb
> > > -rwxr-xr-x. 1 shahid shahid 56335 Jul 6 17:19 dropdb
> > > -rwxr-xr-x. 1 shahid shahid 64416 Jul 6 17:19
> createuser
> > > -rwxr-xr-x. 1 shahid shahid 56305 Jul 6 17:19
> dropuser
> > > -rwxr-xr-x. 1 shahid shahid 61135 Jul 6 17:19
> clusterdb
> > > -rwxr-xr-x. 1 shahid shahid 68735 Jul 6 17:19
> vacuumdb
> > > -rwxr-xr-x. 1 shahid shahid 64047 Jul 6 17:19
> reindexdb
> > > -rwxr-xr-x. 1 shahid shahid 59104 Jul 6 17:19
> pg_isready
> > >
> > > Thanks
> > > Shahid
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Sent from:
> > >
> http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
> > >
> > >
> >
>
^ permalink raw reply [nested|flat] 14+ messages in thread
end of thread, other threads:[~2018-07-08 12:22 UTC | newest]
Thread overview: 14+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-04-18 18:42 "postgres" is needed by initdb but was not found H S <aras_h1988@yahoo.com>
2011-04-18 21:51 ` raghu ram <raghuchennuru@gmail.com>
2011-04-18 21:55 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-04-19 05:09 ` Muruganand Karthikeyan <muruthegun@gmail.com>
2011-04-19 12:00 ` Grzegorz Szpetkowski <gszpetkowski@gmail.com>
2018-07-06 17:46 ` mohammed shahid <mohammedshahid.r@gmail.com>
2018-07-07 05:12 ` Shreeyansh Dba <shreeyansh2014@gmail.com>
2018-07-07 05:37 ` Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>
2018-07-08 10:08 ` Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
2018-07-08 11:21 ` Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>
2018-07-08 12:11 ` Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
2018-07-08 12:17 ` Mohammed Shahid Nawaz <mohammedshahid.r@gmail.com>
2018-07-08 12:22 ` Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
2011-04-19 08:53 Re: "postgres" is needed by initdb but was not found H S <aras_h1988@yahoo.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