From aras_h1988@yahoo.com Mon Apr 18 21:45:56 2011 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 7BF171337BEB for ; Mon, 18 Apr 2011 18:45:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 34451-05 for ; Mon, 18 Apr 2011 21:45:49 +0000 (UTC) Received: from mx2.hub.org (mx2.hub.org [200.46.204.254]) by mail.postgresql.org (Postfix) with ESMTP id 0F9711337BBA for ; Mon, 18 Apr 2011 18:45:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from web65907.mail.ac4.yahoo.com (web65907.mail.ac4.yahoo.com [98.136.86.198]) by mx2.hub.org (Postfix) with SMTP id D467E3EAADB6 for ; Mon, 18 Apr 2011 15:43:21 -0300 (ADT) Received: (qmail 83143 invoked by uid 60001); 18 Apr 2011 18:42:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1303152139; bh=qrGfad/5llC8ce59Vpz4rljIybOmiC7vlKG3vx6eco4=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=Saz1dy4Foqy5k6F7A0sEVskD6qbumc8urQAPOZxMmK6HUsEbt8E+ioE2X+a3ljP4HvVMc3/R9w/JSA13QQT7WR+O1umjbeiRDb5YZEcctO0+hkDMlyoap4x467+HbZvCNtpyGhRzRMbLtqDbK8QPgwuO1+n2qsB/aui9r7A/wUk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=gc0cD/mP4lG4OdEVhEDGDmFXm90fRGlPqkkvtDUFRVxG7qa6YFH1PLNimjRkiwOvYdcxTBmAm/Ccym7ulU7E2J18Dry9Qg00cAcnLjn67nSSPKmku9ooWo9W+wEQnCI+k/+MKhc6pmzH52rW8/tc8ZBxyQ9xKUoXECyb+ui1kZQ=; Message-ID: <926506.81971.qm@web65907.mail.ac4.yahoo.com> X-YMail-OSG: djpVJXcVM1lmoxUdLKKlnuTBhzf2PutnH6RgLKMe08oFOWF sqan4AG3pxLbGq2EhsWfMWNDgQsTFuP8Skk.CjF22UW6g2PGadQxtWDv.5oM eu966EkCK6sBOeadP9HfPE55BxLnIIfjTkiHF5pooxwFj2DOLeQCQi3183qs d9GxqfhgugnrHK.y2ZhwH4xj0Z4t11z.G5k.YEodpJJMrcrVBMGBPUFTVN.G 5HrgYOyZy0yPOgFppE2dUGKreBgJZdroyAuUse7qakeNoseSxgFmWK53Z2cM 4tRt1xqzCbkmBZl4wXTpGhyCJcOPyIVf.j6eUjDLoQM5Ns.wNTfffV0uovNt ELyaBg78TjfEwpI89mMG42xpzt.QriyEbF2NLKklRPH1E7RSnD.E27wQjfRd jac2nRFOlHp0u Received: from [2.176.90.35] by web65907.mail.ac4.yahoo.com via HTTP; Mon, 18 Apr 2011 11:42:19 PDT X-Mailer: YahooMailClassic/12.0.2 YahooMailWebService/0.8.109.295617 Date: Mon, 18 Apr 2011 11:42:19 -0700 (PDT) From: H S Subject: "postgres" is needed by initdb but was not found To: admin , pgsql novice MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1093753968-1303152139=:81971" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.555 tagged_above=-10 required=5 tests=BAYES_20=-0.001, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001 X-Spam-Level: * X-Archive-Number: 201104/152 X-Sequence-Number: 37333 --0-1093753968-1303152139=:81971 Content-Type: text/plain; charset=us-ascii [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 --0-1093753968-1303152139=:81971 Content-Type: text/html; charset=us-ascii
[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
--0-1093753968-1303152139=:81971-- From raghuchennuru@gmail.com Mon Apr 18 21:52:20 2011 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D7DD01337C30; Mon, 18 Apr 2011 18:52:20 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 08800-09; Mon, 18 Apr 2011 21:51:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f46.google.com (mail-ew0-f46.google.com [209.85.215.46]) by mail.postgresql.org (Postfix) with ESMTP id B8E071337BF8; Mon, 18 Apr 2011 18:51:13 -0300 (ADT) Received: by ewy4 with SMTP id 4so1521629ewy.19 for ; Mon, 18 Apr 2011 14:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=4sFOV7T6sBvJw2nSVPD/6FoZ/PU+5ERIVy9qyDUYRIs=; b=n7MtxExcXKQrqFBxXXaGZPknjgZog9ZWMfl1tPKcZFBkb0Rpk7DQCccYw2YcT5nhFm +wrTNbSu/Wojm3kzJdcHMSYu/gSOPggxzYWncZnbV6SWmftc59oViVX+QSim/ckoCnt9 mKf0GKbleL7tVcvg0ac7N2wx/VYbAhJ+3gj0A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=lkzxMyl6cxcNQo8whCxztwMLCZ/rSqnKyFBy1dhQycoVes2JD920QGC/3HpwxXXo/9 6G6CWOC9KUXpb0UkIXJ0FwBMMy+1+eowNkocQIkH1lYpw2mu6JGmAllSpOOXMRCTKue6 rj9TqjzVhJfbydIeCCrelSWHBPhKiMKheOMhA= MIME-Version: 1.0 Received: by 10.213.23.92 with SMTP id q28mr2359810ebb.80.1303163470174; Mon, 18 Apr 2011 14:51:10 -0700 (PDT) Received: by 10.213.98.65 with HTTP; Mon, 18 Apr 2011 14:51:10 -0700 (PDT) In-Reply-To: <926506.81971.qm@web65907.mail.ac4.yahoo.com> References: <926506.81971.qm@web65907.mail.ac4.yahoo.com> Date: Tue, 19 Apr 2011 03:21:10 +0530 Message-ID: Subject: Re: "postgres" is needed by initdb but was not found From: raghu ram To: H S Cc: admin , pgsql novice Content-Type: multipart/alternative; boundary=000e0cdf97b6b962eb04a1386332 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.897 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201104/153 X-Sequence-Number: 37334 --000e0cdf97b6b962eb04a1386332 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Apr 19, 2011 at 12:12 AM, H S 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 > --000e0cdf97b6b962eb04a1386332 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Tue, Apr 19, 2011 at 12:12 AM, H S <aras_h1988@yaho= o.com> wrote:
<= /table>

Ok, to know where your installation locati= on is, try this command.

which initdb
-- Raghu


=A0
[postgres@localhost bin]$ ./initdb --enable-selinux = -D /opt/sepgsql/
The program= "postgres" is needed by initdb but was not found in thesame directory as "/u= sr/local/pgsql/bin/initdb".
Check your = installation.

What should I do to fix the problem?

sara

--000e0cdf97b6b962eb04a1386332-- From Kevin.Grittner@wicourts.gov Mon Apr 18 21:55:19 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id AF0851337B43; Mon, 18 Apr 2011 18:55:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 10157-02; Mon, 18 Apr 2011 21:55:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 0D3FE133740B; Mon, 18 Apr 2011 18:55:11 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Mon, 18 Apr 2011 16:55:12 -0500 Message-Id: <4DAC6CEA020000250003C984@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Mon, 18 Apr 2011 16:55:06 -0500 From: "Kevin Grittner" To: "admin" , "pgsql novice" , "H S" Subject: Re: "postgres" is needed by initdb but was not found References: <926506.81971.qm@web65907.mail.ac4.yahoo.com> In-Reply-To: <926506.81971.qm@web65907.mail.ac4.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/154 X-Sequence-Number: 37335 H S 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 From muruthegun@gmail.com Tue Apr 19 05:09:47 2011 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id A18D31337BDF for ; Tue, 19 Apr 2011 02:09:47 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 92982-04 for ; Tue, 19 Apr 2011 05:09:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) by mail.postgresql.org (Postfix) with ESMTP id F154F1337BDC for ; Tue, 19 Apr 2011 02:09:39 -0300 (ADT) Received: by wya21 with SMTP id 21so4495911wya.19 for ; Mon, 18 Apr 2011 22:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-type; bh=eGCI6gctLTa9GefvWBukQN7FjcRvpTXIUmL4FqwhdnM=; b=AlK/g85jKAECesj5mOWn2wCqRJGCqBsrgXONpQOAz4cpDWpPPURHmYU2KNtVh1wG7b wYfVC/BajS/S8XDRmCos6+cRm3PjMIbBOpudI+C3nQSuEEg+iLlqC8dfpJpF3BW30U8h 7DXECjZtfql67sr3kbN3P6WPWNgx7FSbOZcIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; b=NIaq4cmZIqJlZ8GQMmHOewm2MXDp/n2Gz2xccPaOvADgkF6cz7eur2ck2xx6jW3KWW zpn2g6XWRiQj7hGiIFsMr+Vae/Oq/Z+WlWXhBA7Pb/M7SR8nyCtdsI38JPwKFvECA7Dk jBPQ8g4JTUnCeYmAAdoi+ugiMGp4fbNDXvcYE= MIME-Version: 1.0 Received: by 10.216.145.135 with SMTP id p7mt15469635wej.38.1303189778539; Mon, 18 Apr 2011 22:09:38 -0700 (PDT) Received: by 10.216.1.1 with HTTP; Mon, 18 Apr 2011 22:09:38 -0700 (PDT) In-Reply-To: <4DAC6CEA020000250003C984@gw.wicourts.gov> References: <926506.81971.qm@web65907.mail.ac4.yahoo.com> <4DAC6CEA020000250003C984@gw.wicourts.gov> Date: Tue, 19 Apr 2011 10:39:38 +0530 Message-ID: Subject: Re: "postgres" is needed by initdb but was not found From: Muruganand Karthikeyan Cc: admin , pgsql novice Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.867 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, MISSING_HEADERS=1.021, RFC_ABUSE_POST=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201104/155 X-Sequence-Number: 37336 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 From aras_h1988@yahoo.com Tue Apr 19 08:53:50 2011 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 309981337BD0 for ; Tue, 19 Apr 2011 05:53:50 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 45685-04 for ; Tue, 19 Apr 2011 08:53:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from web65901.mail.ac4.yahoo.com (web65901.mail.ac4.yahoo.com [98.136.86.192]) by mail.postgresql.org (Postfix) with SMTP id 8AB641337BA3 for ; Tue, 19 Apr 2011 05:53:32 -0300 (ADT) Received: (qmail 29070 invoked by uid 60001); 19 Apr 2011 08:53:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1303203212; bh=7Eyo8vUacmn8eCTVD0esGZG28xmtiHN813524K7zjqQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=orK+XNMXwcCe7npQKnFjWTYDF3Fq4csPmGrBj7RoOQ+UlYu0hf2j41K9wAjJ/NT+iYUSXtrfJr9fl7GxdBQqm7lmCKNJkrM2OG56VWNAE5dwxATKBAAC/5Tgp6d2TJM42OPe7xTa7aRjJc3rwdNF6FjGaRVM7udFU9A4YP/UqY8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=mFtM566Nx6+bHzc/BaXAWURxAZLU2fPJA4Yz8ty/jwLIRv06ximbO79KBpqqIw4YGv2UisrycuuTaXvUAc5WHVEYqbzBhZYdlBK7cqCjnyyqcRJ0g54PXb+WNNHkOHovoolV2x9P6ILzMCIUF9CS993m3S4mv4yFxJTlwDtVuto=; Message-ID: <110500.21762.qm@web65901.mail.ac4.yahoo.com> X-YMail-OSG: Qdqn288VM1l.bSGooz7jS6LdvnGaXwFfdFROabYXuzh55Z. OyG_9QtEJUG.ggDwZpEnwK2MWQXkP8vrA_rd0ggpSj9cYH681ss3kILbTc.b Jm6hFezgOMO4rIz3OQBzLY8IxeJnJe4VVXLkj1PHbdSr4fATcCiJHeOy31CZ fhVwl1hzemLz3LoGpNsP5Xn49OAXhl15VqwYo3Ydq_CB2Iq5LV4v.P95km_J PR7oU3AHDDJ8BGNYJKJJKdZXA9uWhKL7KzwVFjZ2b3.xkFG25NcJvk66qJSn RoZLcIQmD14nNmIU3etbGZ174Ni5sC_CoYEIGtfmAPlVCEsX14NYNs8TfOCz bWe452WOmlNBaGzfXrGmCBIupqAhbM3Nzto8jRBvmDWJaWsx6tGrbgOU6PKb qo8ddQEWc0Dqy4A-- Received: from [2.176.101.50] by web65901.mail.ac4.yahoo.com via HTTP; Tue, 19 Apr 2011 01:53:32 PDT X-Mailer: YahooMailClassic/12.0.2 YahooMailWebService/0.8.109.295617 Date: Tue, 19 Apr 2011 01:53:32 -0700 (PDT) From: H S Subject: Re: "postgres" is needed by initdb but was not found To: admin MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-192990531-1303203212=:21762" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.046 tagged_above=-10 required=5 tests=BAYES_05=-0.5, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: * X-Archive-Number: 201104/163 X-Sequence-Number: 37344 --0-192990531-1303203212=:21762 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Did you run ./initidb with /usr/local/pgsql/bin/ as your current directory? =20 Is there a postgres executable in that directory? @: yes there is a postgre= s in that directory.=20 =20 Also, what version? @: 9.0.1=A0=20 Where did you get it?@: by compiling the source code. =A0 How did you install it?=A0 @: above. What's your OS? @ fedora 14 *=20 -Kevin sara --0-192990531-1303203212=:21762 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Did you run ./initidb with /usr/local/pgsql/b= in/ as your current
directory?

Is there a postgres executable in= that directory? @: yes there is a postgres in that directory.

Als= o, what version? @: 9.0.1 
Where did you get it?@: by compiling th= e source code.
  How did you install it?  @: above.
What's = your OS? @ fedora 14
*

-Kevin

sara
--0-192990531-1303203212=:21762-- From gszpetkowski@gmail.com Tue Apr 19 12:01:05 2011 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 125061337B54 for ; Tue, 19 Apr 2011 09:01:05 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 92771-04 for ; Tue, 19 Apr 2011 12:00:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.214.174]) by mail.postgresql.org (Postfix) with ESMTP id C955B1337BD7 for ; Tue, 19 Apr 2011 09:00:43 -0300 (ADT) Received: by iwn34 with SMTP id 34so4705684iwn.19 for ; Tue, 19 Apr 2011 05:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=QUpHQ7Xx082h06R4lZRjwvzprtAAXDM5L/EuIQQwT3k=; b=XmEqSLg6K47Yi6bhEYeIXr35YkWyU5vI4n1kXcQ+wleE4Lt6+Wt7CBKGUB4anGeQ9E reeIoUoZ1KdZsl70VvVcXSWS12QXi/7P/iAbudNg8U80Yb4LiJWEFNV4jIl9q6JYst/p BEam0GXCwuA17PzbhnYU5K1dJsP2zBWCdlFWg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=PYbPVpy75JtmsUtTynnblOqfIfV0G5lcnTmg2VyJlPNx/c4gkSeQPahLTV+Nek6b1X yY2yAfnKFULAOwT/p2pQ00BXZptQznfovjo05OBmwgvTemGFfdm0z262oGLcto2HH1Lf TPVP1pwWZNvYeQtrUDxxriZcPgIHd8iwO4XBg= MIME-Version: 1.0 Received: by 10.231.206.67 with SMTP id ft3mr4806793ibb.40.1303214442912; Tue, 19 Apr 2011 05:00:42 -0700 (PDT) Received: by 10.231.31.205 with HTTP; Tue, 19 Apr 2011 05:00:42 -0700 (PDT) In-Reply-To: References: <926506.81971.qm@web65907.mail.ac4.yahoo.com> <4DAC6CEA020000250003C984@gw.wicourts.gov> Date: Tue, 19 Apr 2011 14:00:42 +0200 Message-ID: Subject: Re: [ADMIN] "postgres" is needed by initdb but was not found From: Grzegorz Szpetkowski To: Muruganand Karthikeyan Cc: pgsql-novice@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.776 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001, URI_HEX=1.122 X-Spam-Level: X-Archive-Number: 201104/50 X-Sequence-Number: 24939 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 : > 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 > From mohammedshahid.r@gmail.com Fri Jul 6 17:46:00 2018 Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fbXDN-0006De-JE for pgsql-admin@arkaria.postgresql.org; Fri, 06 Jul 2018 20:20:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fbXDL-0006gF-Br for pgsql-admin@arkaria.postgresql.org; Fri, 06 Jul 2018 20:20:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fbUo1-0000nE-CC for pgsql-admin@lists.postgresql.org; Fri, 06 Jul 2018 17:46:05 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fbUny-0006Vk-3u for pgsql-admin@postgresql.org; Fri, 06 Jul 2018 17:46:04 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id A4C57DE0034D for ; Fri, 6 Jul 2018 10:46:00 -0700 (MST) Date: Fri, 6 Jul 2018 10:46:00 -0700 (MST) From: mohammed shahid To: pgsql-admin@postgresql.org Message-ID: <1530899160672-0.post@n3.nabble.com> In-Reply-To: <4DAC6CEA020000250003C984@gw.wicourts.gov> References: <926506.81971.qm@web65907.mail.ac4.yahoo.com> <4DAC6CEA020000250003C984@gw.wicourts.gov> Subject: Re: "postgres" is needed by initdb but was not found MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 From shreeyansh2014@gmail.com Sat Jul 7 05:12:46 2018 Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fbfWf-0004OR-4c for pgsql-admin@arkaria.postgresql.org; Sat, 07 Jul 2018 05:12:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fbfWd-0004Du-Ii for pgsql-admin@arkaria.postgresql.org; Sat, 07 Jul 2018 05:12:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fbfWd-0004Dn-BV for pgsql-admin@lists.postgresql.org; Sat, 07 Jul 2018 05:12:51 +0000 Received: from mail-yb0-x243.google.com ([2607:f8b0:4002:c09::243]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fbfWa-0004pD-7k for pgsql-admin@postgresql.org; Sat, 07 Jul 2018 05:12:50 +0000 Received: by mail-yb0-x243.google.com with SMTP id e84-v6so5372738ybb.0 for ; Fri, 06 Jul 2018 22:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Beq5qmhqPFN9QtK5ucONosol4V8kZVYTVrU3/PCiNoU=; b=eWFyYLZy4NN7tMSnRLvWpMvLc54HwdM0LJLNPtf8Y3hdTUHlI9Xd7Ogd3m/zk0tjdd MIWDuw3/3QsEW4HDTFb4/vKE8s8OHE3BWs9C2vLqKY+cES9YK6eJiYzizkfvivW6/joi nA9qTjS6WqYs0HOE/5pWW5SiN3HY4pH1oUXtMyOHXT44gxU159bRP3JhW2VEflPGTdZf gMspvXlTA2XoCwRVtNqk5hwglZZqzMHGN+oxIf2uWAVIbmgjS7zu9oBZE3Fbshtv7Nls gF4EoMh7k9z3MG5OAwh8owoEFAWBj8yXjP8NIjsAVjO1rSF0dRXJXjf6u3mmsSG0TtgQ cpvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Beq5qmhqPFN9QtK5ucONosol4V8kZVYTVrU3/PCiNoU=; b=umemf/dsn4G4uKKxMCO6r8hvKXd1GDUOFmukHZ05fN6pSdJ+P2ynECP5LVSyqf4zXW Tgu9axBvJDk0evxkP6wLOMhQT55Kjm0cgE0BFsoG7sOGxZGpRLtLL0x0PQrWY0JMKEXz drPVYJtjBC+hI9N6hU6dnJCSsQJ7qBsLcDU0Bdzr9zNzjLgR1njWq5o6WOT40dJWGDXU lu3p53ZBTeyUss+SauSeYigmJzC2xGBr5B/ZdueacsZ9fBw1lTtDCwlmLq33rF8V68zu pHdOtp/qnT8J0nXtnrIrUXCnynoZ/F4yHBC8PROwBR5Yx7cAHPYFNdOBXEHx1cZWeojW IcDQ== X-Gm-Message-State: APt69E2aPu0AoMCKTsj3OaqNnDIOgwS0tJbYyRCS+HcnnLLiU9xfdLaS 2w6ltrPwiV9im0qBe5RM0FSGHey3wNXUJxRu3cQ= X-Google-Smtp-Source: AAOMgpcX0HXkFmy1lGMZ7I5TiBSx41K2OzlZBCCnE99DKvm+XsmjPndc4Xi7l787DRPoXCr1W/rO2sOipUkv2n2rLvM= X-Received: by 2002:a5b:287:: with SMTP id x7-v6mr6695300ybl.476.1530940366396; Fri, 06 Jul 2018 22:12:46 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:f406:0:0:0:0:0 with HTTP; Fri, 6 Jul 2018 22:12:46 -0700 (PDT) In-Reply-To: <1530899160672-0.post@n3.nabble.com> References: <926506.81971.qm@web65907.mail.ac4.yahoo.com> <4DAC6CEA020000250003C984@gw.wicourts.gov> <1530899160672-0.post@n3.nabble.com> From: Shreeyansh Dba Date: Sat, 7 Jul 2018 10:42:46 +0530 Message-ID: Subject: Re: "postgres" is needed by initdb but was not found To: mohammed shahid Cc: pgsql-admin Content-Type: multipart/alternative; boundary="000000000000b62717057061d4a7" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000b62717057061d4a7 Content-Type: text/plain; charset="UTF-8" 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. On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid 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 > > --000000000000b62717057061d4a7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
= Hi Mohammed,

As I suspect that yo= u are trying to create a cluster but pg_ctl is a not a valid option to crea= te a cluster.

You can use initdb option for creating a cluster...

Hope this hel= ps.



<= /div>

On Fri, Jul 6, 2018 at 11:16 PM, mohammed sh= ahid <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.

=C2=A0sudo -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<= br> 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=C2=A0 6 17:19 postgres
lrwxrwxrwx. 1 shahid shahid=C2=A0 =C2=A0 =C2=A0 =C2=A08 Jul=C2=A0 6 17:19 p= ostmaster -> postgres
-rwxr-xr-x. 1 shahid shahid=C2=A0 908965 Jul=C2=A0 6 17:19 ecpg
-rwxr-xr-x. 1 shahid shahid=C2=A0 128690 Jul=C2=A0 6 17:19 initdb
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A030548 Jul=C2=A0 6 17:19 pg_archivec= leanup
-rwxr-xr-x. 1 shahid shahid=C2=A0 112608 Jul=C2=A0 6 17:19 pg_basebackup -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A071241 Jul=C2=A0 6 17:19 pg_receivew= al
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A072771 Jul=C2=A0 6 17:19 pg_recvlogi= cal
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A030009 Jul=C2=A0 6 17:19 pg_config -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A039920 Jul=C2=A0 6 17:19 pg_controld= ata
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A058438 Jul=C2=A0 6 17:19 pg_ctl
-rwxr-xr-x. 1 shahid shahid=C2=A0 400623 Jul=C2=A0 6 17:19 pg_dump
-rwxr-xr-x. 1 shahid shahid=C2=A0 164991 Jul=C2=A0 6 17:19 pg_restore
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A097686 Jul=C2=A0 6 17:19 pg_dumpall<= br> -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A049138 Jul=C2=A0 6 17:19 pg_resetwal=
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A088205 Jul=C2=A0 6 17:19 pg_rewind -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A031798 Jul=C2=A0 6 17:19 pg_test_fsy= nc
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A026337 Jul=C2=A0 6 17:19 pg_test_tim= ing
-rwxr-xr-x. 1 shahid shahid=C2=A0 130515 Jul=C2=A0 6 17:19 pg_upgrade
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A086270 Jul=C2=A0 6 17:19 pg_waldump<= br> -rwxr-xr-x. 1 shahid shahid=C2=A0 141273 Jul=C2=A0 6 17:19 pgbench
-rwxr-xr-x. 1 shahid shahid=C2=A0 454216 Jul=C2=A0 6 17:19 psql
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A060635 Jul=C2=A0 6 17:19 createdb -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A056335 Jul=C2=A0 6 17:19 dropdb
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A064416 Jul=C2=A0 6 17:19 createuser<= br> -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A056305 Jul=C2=A0 6 17:19 dropuser -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A061135 Jul=C2=A0 6 17:19 clusterdb -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A068735 Jul=C2=A0 6 17:19 vacuumdb -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A064047 Jul=C2=A0 6 17:19 reindexdb -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A059104 Jul=C2=A0 6 17:19 pg_isready<= br>
Thanks
Shahid





--
Sent from: http://www.postgresql-arc= hive.org/PostgreSQL-admin-f2076596.html


--000000000000b62717057061d4a7-- From mohammedshahid.r@gmail.com Sat Jul 7 05:37:11 2018 Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc4Yj-0002lp-Oy for pgsql-admin@arkaria.postgresql.org; Sun, 08 Jul 2018 07:56:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fc4Yh-00043J-Lv for pgsql-admin@arkaria.postgresql.org; Sun, 08 Jul 2018 07:56:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fbfuU-0007Cw-N2 for pgsql-admin@lists.postgresql.org; Sat, 07 Jul 2018 05:37:30 +0000 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fbfuQ-0005QW-SM for pgsql-admin@postgresql.org; Sat, 07 Jul 2018 05:37:29 +0000 Received: by mail-lf0-x244.google.com with SMTP id i15-v6so11370065lfc.2 for ; Fri, 06 Jul 2018 22:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QfKPAKQLl60u69PQmD3WgB5jvjOlgen2gPPnaJoSHHw=; b=c9rQXBniqS+l4ZdTBDhg3OsUa4z1Fyp50O1f31H80sKWWfipPNrqbMJgibRJjdQ9EL UrGVbI7ZvnpAsZrWct2Lx36gVjPfdHFRhg59teJPKFPXvUt/52dYvTDUS17qxqMo6vlU Abe4lwMnIUYjlIySMj3eVXt45xZTMX1PIbBTOYUBaWhgx3IlrA3J9EbPyGdGSCsp0a5+ 6rRHU6KfU7kPnPEneLVZYyD8QAs7GQfqIA0410ywLAEhnyoBNcIVDsW7g8o7ltxHprop tXE0RR5mg8Q7Bl3/IkfriTuYwK6KqwAYkSQFyzwd35trWuHJx+5arIkKVtF9j8fA2haR su/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QfKPAKQLl60u69PQmD3WgB5jvjOlgen2gPPnaJoSHHw=; b=LEZxdN5/hXx3xmEawDMF0FeqDuP5fgVHHZjyrm/kdzhu7Ouc+ffPxCufSDwuTTS8sx oUzxcaFa7iz6WlbnrjcDdNsHEUimO6Q258Q7/NT6SuhMV0JtaThnikCPUXF5f0LtgOFj 4A8bmd0X+H51S1Z+ldZyQJpJe4wySpBt3Q62FCFaaVj7VBmGqGWbvdhiDMjTm23tofqw UcePt1flRwMte6gdKZzi4rPW5vEiJeAx4ubzG9kwwkCaUFkp5Xghf2v2l6gb6YG4UkXA ZrpK3r5Gvg7rEkH7iPXHlupenWrjIMDWLwmccXagJobuJZ0oJZ5Qi21NY3H961XwTJs4 mc2g== X-Gm-Message-State: APt69E15O0wqer4f/a/aYrt4yVJ9Szdb+8WhqUuWs4bCNEkvTiVS1Go2 XoaivHl/6o1Ux71ZIC659hodlvsTHgxprZf4aD4= X-Google-Smtp-Source: AAOMgpcs1SCGQPKMmc5Xt3oUD/E8ZiF0XfG8p7C2EYmxd/fpMbM5xY1dcLEynoOg2Tp6jrBo4y9RFv/gS7tsTyxuVIk= X-Received: by 2002:a19:9646:: with SMTP id y67-v6mr8669426lfd.130.1530941846184; Fri, 06 Jul 2018 22:37:26 -0700 (PDT) MIME-Version: 1.0 References: <926506.81971.qm@web65907.mail.ac4.yahoo.com> <4DAC6CEA020000250003C984@gw.wicourts.gov> <1530899160672-0.post@n3.nabble.com> In-Reply-To: From: Mohammed Shahid Nawaz Date: Sat, 7 Jul 2018 11:07:11 +0530 Message-ID: Subject: Re: "postgres" is needed by initdb but was not found To: Shreeyansh Dba Cc: pgsql-admin Content-Type: multipart/alternative; boundary="000000000000e9e68c0570622c27" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000e9e68c0570622c27 Content-Type: text/plain; charset="UTF-8" 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, 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. > > > > > 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 >> >> > --000000000000e9e68c0570622c27 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Shreeyansh,
Thank you for the feedbac= k.
The problem continues to exist even while using i= nitdb command.

I had bee= n using pg_ctl to initiate a db in my earlier version 9.6.3 as well.
<= div dir=3D"auto">
The command goes as follows, a= nd 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 t= his helps.


<= div dir=3D"ltr">


On Fri, Jul 6, 2018 at 11:16 PM, mohammed sh= ahid <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.

=C2=A0sudo -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<= br> 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=C2=A0 6 17:19 postgres
lrwxrwxrwx. 1 shahid shahid=C2=A0 =C2=A0 =C2=A0 =C2=A08 Jul=C2=A0 6 17:19 p= ostmaster -> postgres
-rwxr-xr-x. 1 shahid shahid=C2=A0 908965 Jul=C2=A0 6 17:19 ecpg
-rwxr-xr-x. 1 shahid shahid=C2=A0 128690 Jul=C2=A0 6 17:19 initdb
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A030548 Jul=C2=A0 6 17:19 pg_archivec= leanup
-rwxr-xr-x. 1 shahid shahid=C2=A0 112608 Jul=C2=A0 6 17:19 pg_basebackup -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A071241 Jul=C2=A0 6 17:19 pg_receivew= al
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A072771 Jul=C2=A0 6 17:19 pg_recvlogi= cal
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A030009 Jul=C2=A0 6 17:19 pg_config -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A039920 Jul=C2=A0 6 17:19 pg_controld= ata
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A058438 Jul=C2=A0 6 17:19 pg_ctl
-rwxr-xr-x. 1 shahid shahid=C2=A0 400623 Jul=C2=A0 6 17:19 pg_dump
-rwxr-xr-x. 1 shahid shahid=C2=A0 164991 Jul=C2=A0 6 17:19 pg_restore
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A097686 Jul=C2=A0 6 17:19 pg_dumpall<= br> -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A049138 Jul=C2=A0 6 17:19 pg_resetwal=
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A088205 Jul=C2=A0 6 17:19 pg_rewind -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A031798 Jul=C2=A0 6 17:19 pg_test_fsy= nc
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A026337 Jul=C2=A0 6 17:19 pg_test_tim= ing
-rwxr-xr-x. 1 shahid shahid=C2=A0 130515 Jul=C2=A0 6 17:19 pg_upgrade
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A086270 Jul=C2=A0 6 17:19 pg_waldump<= br> -rwxr-xr-x. 1 shahid shahid=C2=A0 141273 Jul=C2=A0 6 17:19 pgbench
-rwxr-xr-x. 1 shahid shahid=C2=A0 454216 Jul=C2=A0 6 17:19 psql
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A060635 Jul=C2=A0 6 17:19 createdb -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A056335 Jul=C2=A0 6 17:19 dropdb
-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A064416 Jul=C2=A0 6 17:19 createuser<= br> -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A056305 Jul=C2=A0 6 17:19 dropuser -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A061135 Jul=C2=A0 6 17:19 clusterdb -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A068735 Jul=C2=A0 6 17:19 vacuumdb -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A064047 Jul=C2=A0 6 17:19 reindexdb -rwxr-xr-x. 1 shahid shahid=C2=A0 =C2=A059104 Jul=C2=A0 6 17:19 pg_isready<= br>
Thanks
Shahid





--
Sent from:
htt= p://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html


--000000000000e9e68c0570622c27-- From mark.kirkwood@catalyst.net.nz Sun Jul 8 10:08:54 2018 Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc6cw-0000DB-5Z for pgsql-admin@arkaria.postgresql.org; Sun, 08 Jul 2018 10:09:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fc6cu-0006BB-CU for pgsql-admin@arkaria.postgresql.org; Sun, 08 Jul 2018 10:09:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc6cu-0006B3-5I for pgsql-admin@lists.postgresql.org; Sun, 08 Jul 2018 10:09:08 +0000 Received: from cat-porwal-prod-mail1.catalyst.net.nz ([202.78.240.226]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc6co-0001cA-1g for pgsql-admin@postgresql.org; Sun, 08 Jul 2018 10:09:06 +0000 Authentication-Results: auth=pass smtp.auth=mark.kirkwood@catalyst.net.nz smtp.mailfrom=mark.kirkwood@catalyst.net.nz Received: from [IPv6:2406:e001:cf9:1:4949:d93a:590:5a13] (unknown [IPv6:2406:e001:cf9:1:4949:d93a:590:5a13]) (Authenticated sender: mark.kirkwood@catalyst.net.nz) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTPSA id 3874380809; Sun, 8 Jul 2018 22:08:54 +1200 (NZST) Subject: Re: "postgres" is needed by initdb but was not found To: Mohammed Shahid Nawaz , Shreeyansh Dba Cc: pgsql-admin References: <926506.81971.qm@web65907.mail.ac4.yahoo.com> <4DAC6CEA020000250003C984@gw.wicourts.gov> <1530899160672-0.post@n3.nabble.com> From: Mark Kirkwood Message-ID: <22ccdf09-a7c7-7560-67ac-1d8f07a2ace8@catalyst.net.nz> Date: Sun, 8 Jul 2018 22:08:54 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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, > 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. > > > > > On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid > > > 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 > > From mohammedshahid.r@gmail.com Sun Jul 8 11:21:17 2018 Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fcAg6-0003nb-AE for pgsql-admin@arkaria.postgresql.org; Sun, 08 Jul 2018 14:28:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fcAg2-0006Dt-B7 for pgsql-admin@arkaria.postgresql.org; Sun, 08 Jul 2018 14:28:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc7l7-0002OS-Bb for pgsql-admin@lists.postgresql.org; Sun, 08 Jul 2018 11:21:41 +0000 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fc7kz-0003J9-KX for pgsql-admin@postgresql.org; Sun, 08 Jul 2018 11:21:40 +0000 Received: by mail-lf0-x242.google.com with SMTP id m12-v6so13039364lfc.10 for ; Sun, 08 Jul 2018 04:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j4i4j6vRXdQj3kgo5OSLFyHpsn1Fto7jL8xSOif42v0=; b=YMHi3r57p9c9mEmxlZiK9MgpMGObmjW3mskUGQQ0nMrdgd8t7XNimZBzOPla6aSbmv UYhHbNJ0dAZcEAU9CbCKbI1sMtVVq1xlj+lqNAzIOBJuWKEVnGF9a4lbtnZ4tfjFhLqd g+gWpsa5ZfXla7ZuRhb0/842FJEoHQ1qczrUAy+p+hkfgEZrt6LL6kjI5Cx3IALZiVPv y6QHAGLYd4ZQnJqkGRrIwNNxUrBCOqRbGxSajoa/SQgDQ/ASqiHJYBAsRDzchIdj4W3U r7Maz3/IbPSbrm5D7RxZNOpUmjR2hP6yToLtFZn3peMXk22FRctK+FdUmwOp1ciSPMRd LRJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j4i4j6vRXdQj3kgo5OSLFyHpsn1Fto7jL8xSOif42v0=; b=Gcuc1Jwo8D9aU1AZ8obuYFgI4Z/A0QiOkzNMVA2/de9oWCu4RWF5EAt/0hzpubJTpC zUmz3B7OJnbE96TDwRrOP7TG2bPzvrO7ZNLgi3XoooyrzrbtG3RYXcX0gbsWP1sdBV1v +X5QvEamVBR1PrAGbajsZw7noCWUyVdMdApWalzLkZdg2dYEkO9Ay8km9Bj1wySMksIu uwRo6b6QSBwCfOBp6wb60aWKOdbQImZ8TOyuh3aSAy5RQfM8W6YfX5+qhjYgeDZScGqF hi3D68iJBooMuDVAP12EHOqx9v3xov7FvpdSVDxe+irb5ihWR8pj7HFKT/rraiHTQ34r RKhg== X-Gm-Message-State: APt69E0plp07VYcP7d/gRX59Tn82bQSxfLsOT3vxvK5STUfMHM3e/NAi tyr0U1Oyzb4XvIZmrTxQgLcHfLwpNkoua37u6Ls= X-Google-Smtp-Source: AAOMgpfNDVfKU8GBGD53i9Tb3y7LT3qFu7rW5aOi1DPg+f8yZHPXoe2O5HJcvenJ49B3isMw6yKVWMoPuBOvAiFzO7Y= X-Received: by 2002:a19:db94:: with SMTP id t20-v6mr11363859lfi.126.1531048892641; Sun, 08 Jul 2018 04:21:32 -0700 (PDT) MIME-Version: 1.0 References: <926506.81971.qm@web65907.mail.ac4.yahoo.com> <4DAC6CEA020000250003C984@gw.wicourts.gov> <1530899160672-0.post@n3.nabble.com> <22ccdf09-a7c7-7560-67ac-1d8f07a2ace8@catalyst.net.nz> In-Reply-To: <22ccdf09-a7c7-7560-67ac-1d8f07a2ace8@catalyst.net.nz> From: Mohammed Shahid Nawaz Date: Sun, 8 Jul 2018 16:51:17 +0530 Message-ID: Subject: Re: "postgres" is needed by initdb but was not found To: Mark Kirkwood Cc: Shreeyansh Dba , pgsql-admin Content-Type: multipart/alternative; boundary="0000000000006134c005707b195c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000006134c005707b195c Content-Type: text/plain; charset="UTF-8" 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, 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, > > 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. > > > > > > > > > > On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid > > > > > 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 > > > > > > --0000000000006134c005707b195c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Mark,=C2=A0
I have built the source c= ode on 64bit and trying to run on 64bit system.

=
The same build=C2=A0 works on 64bit=C2=A0 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 t= he 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 <= br> > 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:
>
>=C2=A0 =C2=A0 =C2=A0Hi Mohammed,
>
>=C2=A0 =C2=A0 =C2=A0As I suspect that you are trying to create a cluste= r but pg_ctl is
>=C2=A0 =C2=A0 =C2=A0a not a valid option to create a cluster.
>
>=C2=A0 =C2=A0 =C2=A0You can use initdb option for creating a cluster...=
>
>=C2=A0 =C2=A0 =C2=A0Hope this helps.
>
>
>=C2=A0 =C2=A0 =C2=A0<http://www.shreeyansh.com> >
>=C2=A0 =C2=A0 =C2=A0On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid >=C2=A0 =C2=A0 =C2=A0<mohammedshahid.r@gmail.com <mail= to:mohammedshahid.r@gmail.com>>
>=C2=A0 =C2=A0 =C2=A0wrote:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Hi Kevin,
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I am new to this forum, but even i am= facing this issue as
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0reported where i
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0get the below error.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0sudo -u shahid ./pg_ctl -D /roo= t/pgsql10x/data/ initdb
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0invalid binary "/root/pgsql10x/b= in/pg_ctl"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0invalid binary "/root/pgsql10x/b= in/pg_ctl"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0invalid binary "/root/pgsql10x/b= in/pg_ctl"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0The program "initdb" is nee= ded by pg_ctl but was not found in the
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0same directory as "pg_ctl".=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Check your installation.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FYI ,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I am trying to run this from root. >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0As reported by H S, even i have built= from the source. I am
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0trying version
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A010. on CentOS7.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I downloaded direct from postgres sit= e.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I am not facing this problem when i r= un as non-root user.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I have all the files in the bin direc= tory, as shared below,
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxrwxrwx. 1 shahid shahid 7604946 J= ul=C2=A0 6 17:19 postgres
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0lrwxrwxrwx. 1 shahid shahid=C2=A0 =C2= =A0 =C2=A0 =C2=A08 Jul=C2=A0 6 17:19 postmaster ->
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0postgres
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 908= 965 Jul=C2=A0 6 17:19 ecpg
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 128= 690 Jul=C2=A0 6 17:19 initdb
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A030548 Jul=C2=A0 6 17:19 pg_archivecleanup
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 112= 608 Jul=C2=A0 6 17:19 pg_basebackup
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A071241 Jul=C2=A0 6 17:19 pg_receivewal
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A072771 Jul=C2=A0 6 17:19 pg_recvlogical
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A030009 Jul=C2=A0 6 17:19 pg_config
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A039920 Jul=C2=A0 6 17:19 pg_controldata
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A058438 Jul=C2=A0 6 17:19 pg_ctl
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 400= 623 Jul=C2=A0 6 17:19 pg_dump
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 164= 991 Jul=C2=A0 6 17:19 pg_restore
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A097686 Jul=C2=A0 6 17:19 pg_dumpall
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A049138 Jul=C2=A0 6 17:19 pg_resetwal
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A088205 Jul=C2=A0 6 17:19 pg_rewind
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A031798 Jul=C2=A0 6 17:19 pg_test_fsync
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A026337 Jul=C2=A0 6 17:19 pg_test_timing
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 130= 515 Jul=C2=A0 6 17:19 pg_upgrade
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A086270 Jul=C2=A0 6 17:19 pg_waldump
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 141= 273 Jul=C2=A0 6 17:19 pgbench
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 454= 216 Jul=C2=A0 6 17:19 psql
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A060635 Jul=C2=A0 6 17:19 createdb
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A056335 Jul=C2=A0 6 17:19 dropdb
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A064416 Jul=C2=A0 6 17:19 createuser
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A056305 Jul=C2=A0 6 17:19 dropuser
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A061135 Jul=C2=A0 6 17:19 clusterdb
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A068735 Jul=C2=A0 6 17:19 vacuumdb
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A064047 Jul=C2=A0 6 17:19 reindexdb
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1 shahid shahid=C2=A0 =C2= =A059104 Jul=C2=A0 6 17:19 pg_isready
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Thanks
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Shahid
>
>
>
>
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Sent from:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.ht= ml
>
>

--0000000000006134c005707b195c-- From mark.kirkwood@catalyst.net.nz Sun Jul 8 12:11:57 2018 Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc8YB-00062L-Gf for pgsql-admin@arkaria.postgresql.org; Sun, 08 Jul 2018 12:12:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fc8Y6-0003nx-Th for pgsql-admin@arkaria.postgresql.org; Sun, 08 Jul 2018 12:12:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc8Y6-0003np-MK for pgsql-admin@lists.postgresql.org; Sun, 08 Jul 2018 12:12:18 +0000 Received: from cat-porwal-prod-mail1.catalyst.net.nz ([2404:130:4080::4]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc8Xy-0004hR-IL for pgsql-admin@postgresql.org; Sun, 08 Jul 2018 12:12:15 +0000 Authentication-Results: auth=pass smtp.auth=mark.kirkwood@catalyst.net.nz smtp.mailfrom=mark.kirkwood@catalyst.net.nz Received: from [IPv6:2406:e001:cf9:1:4949:d93a:590:5a13] (unknown [IPv6:2406:e001:cf9:1:4949:d93a:590:5a13]) (Authenticated sender: mark.kirkwood@catalyst.net.nz) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTPSA id B16AA806A4; Mon, 9 Jul 2018 00:11:58 +1200 (NZST) Subject: Re: "postgres" is needed by initdb but was not found To: Mohammed Shahid Nawaz Cc: Shreeyansh Dba , pgsql-admin References: <926506.81971.qm@web65907.mail.ac4.yahoo.com> <4DAC6CEA020000250003C984@gw.wicourts.gov> <1530899160672-0.post@n3.nabble.com> <22ccdf09-a7c7-7560-67ac-1d8f07a2ace8@catalyst.net.nz> From: Mark Kirkwood Message-ID: <3ed50135-9bc2-6096-09bc-97a40225c433@catalyst.net.nz> Date: Mon, 9 Jul 2018 00:11:57 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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, > > > 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, > > > >> 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. > > > > > >      > > > >     On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid > >      > >> > >     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 > > > > > From mohammedshahid.r@gmail.com Sun Jul 8 12:17:13 2018 Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fcAgA-0003nx-9A for pgsql-admin@arkaria.postgresql.org; Sun, 08 Jul 2018 14:28:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fcAg8-0006hS-8X for pgsql-admin@arkaria.postgresql.org; Sun, 08 Jul 2018 14:28:44 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc8dC-00063w-C6 for pgsql-admin@lists.postgresql.org; Sun, 08 Jul 2018 12:17:34 +0000 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fc8d8-00070B-Q4 for pgsql-admin@postgresql.org; Sun, 08 Jul 2018 12:17:32 +0000 Received: by mail-lj1-x243.google.com with SMTP id 203-v6so1101470ljj.13 for ; Sun, 08 Jul 2018 05:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4IPcvREqfl3EqKc2FmkrGOxTJF35LI3UfejuFtWZREE=; b=eXs5C2cfMu3BjfSaL94U7zfIe3Az4ukcYIG8d/dJLUWcJaiqOx3xwfEeh/qiofIuNX Pg3+5P63m/YbSnMek+MkcfcpJFTJBk8kYMjvN2Fk7LCAQMOIyOvkpoYVdydJBdTXge7N nCTXMwtpYrBNNdaTSMelS6SraRRLu5xBdBC604zqNYb1ARMgQsrFsC6XbvxPPWqLc6W4 xgkFmVpuqJO8x+eFozNFHnrwd5o6SKMkgmbJxNIDg2ngI53yKZqkv2RbzpCfxnVMna5D GCNZGOiqby/ZzSnwZt/xFgC/LS05aqbkWVBIqyTZcygEf8FGyGsqRlGq2630kH9FCGFi 4QxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4IPcvREqfl3EqKc2FmkrGOxTJF35LI3UfejuFtWZREE=; b=qHxfjcXks4oVGoQrVkxNGmUu37yH2e4cM+tfUwjG9NcUGjbIeSmU2BNvHD6iD3iN1y xHiwlrt+qgSIl985hXfBCW+dSprugfPXVyIyrk3ajfSaB9CYV45Pkzz1Amq+FK148F18 4JoEORTMNE6y7USGAlYDrXwOyrzhSBi0ljA2kF1AowzoKn189ELe4axST3H+CA1T91yx y0a+aC5j5d/gXs17evE2M92045vxK6SPFveyc+0m0lPsRvlfs7WoTF7voC0hpo5xkF0Q vnMZHQNxVHP1LquptT8cfPzsCLXq9n58JLDuhXJZ3g+4pVdSxbOPH2V2zLmHBN0pv3sz BJIA== X-Gm-Message-State: APt69E02i5G5v4eVcNVtIltQavp9CIhy/vpK286a/CJxE+gcUzpsM+UL T5q3ZfR2qCxCUmTdBIMomLZAmxVeeppM0oS8f2I= X-Google-Smtp-Source: AAOMgpe9NV561bTUKW9LZ2yHCQYnwXXe0+GYrQAk29xzoI48BLuDKlf36XWP25imWcvpFH1DPK/TX8UON8XfZDo5Fh4= X-Received: by 2002:a2e:7d10:: with SMTP id y16-v6mr9901049ljc.29.1531052248700; Sun, 08 Jul 2018 05:17:28 -0700 (PDT) MIME-Version: 1.0 References: <926506.81971.qm@web65907.mail.ac4.yahoo.com> <4DAC6CEA020000250003C984@gw.wicourts.gov> <1530899160672-0.post@n3.nabble.com> <22ccdf09-a7c7-7560-67ac-1d8f07a2ace8@catalyst.net.nz> <3ed50135-9bc2-6096-09bc-97a40225c433@catalyst.net.nz> In-Reply-To: <3ed50135-9bc2-6096-09bc-97a40225c433@catalyst.net.nz> From: Mohammed Shahid Nawaz Date: Sun, 8 Jul 2018 17:47:13 +0530 Message-ID: Subject: Re: "postgres" is needed by initdb but was not found To: Mark Kirkwood Cc: Shreeyansh Dba , pgsql-admin Content-Type: multipart/alternative; boundary="0000000000006aa00a05707be11f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000006aa00a05707be11f Content-Type: text/plain; charset="UTF-8" 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, 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, > > > > > 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, > > > > > > >> 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. > > > > > > > > > > > > > > > On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid > > > > > > > >> > > > 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 > > > > > > > > > > --0000000000006aa00a05707be11f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Mark,=C2=A0
Hence we run using sudo c= ommand or with 'su' from the root.
I have be= en 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 syste= m.
>
> The same build=C2=A0 works on 64bit=C2=A0 non-root user login of the s= ame 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:
>
>=C2=A0 =C2=A0 =C2=A0The message 'invalid binary' suggests the w= rong architecture binaries
>=C2=A0 =C2=A0 =C2=A0are installed (e.g 32 bit on 64 bit machine or vice= versa). if you
>=C2=A0 =C2=A0 =C2=A0were
>=C2=A0 =C2=A0 =C2=A0missing the initdb binary your would get a differen= t message (e.g):
>
>=C2=A0 =C2=A0 =C2=A0The The program "initdb" is needed by pg_= ctl but was not found in the
>=C2=A0 =C2=A0 =C2=A0same directory as "/usr/local/bin/pg_ctl"= .
>
>=C2=A0 =C2=A0 =C2=A0regards
>=C2=A0 =C2=A0 =C2=A0Mark
>
>=C2=A0 =C2=A0 =C2=A0On 07/07/18 17:37, Mohammed Shahid Nawaz wrote:
>=C2=A0 =C2=A0 =C2=A0> Hi Shreeyansh,
>=C2=A0 =C2=A0 =C2=A0> Thank you for the feedback.
>=C2=A0 =C2=A0 =C2=A0> The problem continues to exist even while usin= g initdb command.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> I had been using pg_ctl to initiate a db in my= earlier version
>=C2=A0 =C2=A0 =C2=A09.6.3
>=C2=A0 =C2=A0 =C2=A0> as well.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> The command goes as follows, and its working o= n non-root user login
>=C2=A0 =C2=A0 =C2=A0> for the same build version 10.4.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> su - postgres -c '/root/pgsql10x/bin/pg_ct= l -D /root/pgsql10x/data/
>=C2=A0 =C2=A0 =C2=A0> initdb'
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> Thanks,
>=C2=A0 =C2=A0 =C2=A0> Mohammed Shahid Nawaz
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> On Sat 7 Jul, 2018, 10:42 AM Shreeyansh Dba, >=C2=A0 =C2=A0 =C2=A0<shreeyansh2014@gmail.com <mailto:<= a href=3D"mailto:shreeyansh2014@gmail.com" target=3D"_blank" rel=3D"norefer= rer">shreeyansh2014@gmail.com>
>=C2=A0 =C2=A0 =C2=A0> <mailto:shreeyansh2014@gmail.com<= br> >=C2=A0 =C2=A0 =C2=A0<mailto:shreeyansh2014@gmail.com>&g= t;> wrote:
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Hi Mohammed,
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0As I suspect that you are t= rying to create a cluster but
>=C2=A0 =C2=A0 =C2=A0pg_ctl is
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0a not a valid option to cre= ate a cluster.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0You can use initdb option f= or creating a cluster...
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Hope this helps.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0<http://www.s= hreeyansh.com>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0On Fri, Jul 6, 2018 at 11:1= 6 PM, mohammed shahid
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0<mohammedshahid.= r@gmail.com
>=C2=A0 =C2=A0 =C2=A0<mailto:mohammedshahid.r@gmail.com&g= t;
>=C2=A0 =C2=A0 =C2=A0<mailto:mohammedshahid.r@gmail.com >=C2=A0 =C2=A0 =C2=A0<mailto:mohammedshahid.r@gmail.com&g= t;>>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0wrote:
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Hi Kevin,
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I am new to t= his forum, but even i am facing this issue as
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0reported wher= e i
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0get the below= error.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0sudo -u= shahid ./pg_ctl -D /root/pgsql10x/data/ initdb
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0invalid binar= y "/root/pgsql10x/bin/pg_ctl"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0invalid binar= y "/root/pgsql10x/bin/pg_ctl"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0invalid binar= y "/root/pgsql10x/bin/pg_ctl"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0The program &= quot;initdb" is needed by pg_ctl but was not
>=C2=A0 =C2=A0 =C2=A0found in the
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0same director= y as "pg_ctl".
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Check your in= stallation.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FYI ,
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I am trying t= o run this from root.
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0As reported b= y H S, even i have built from the source. I am
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0trying versio= n
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A010. on CentOS= 7.
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I downloaded = direct from postgres site.
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I am not faci= ng this problem when i run as non-root user.
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I have all th= e files in the bin directory, as shared below,
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxrwxrwx. 1= shahid shahid 7604946 Jul=C2=A0 6 17:19 postgres
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0lrwxrwxrwx. 1= shahid shahid=C2=A0 =C2=A0 =C2=A0 =C2=A08 Jul=C2=A0 6 17:19
>=C2=A0 =C2=A0 =C2=A0postmaster ->
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0postgres
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 908965 Jul=C2=A0 6 17:19 ecpg
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 128690 Jul=C2=A0 6 17:19 initdb
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A030548 Jul=C2=A0 6 17:19
>=C2=A0 =C2=A0 =C2=A0pg_archivecleanup
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 112608 Jul=C2=A0 6 17:19
>=C2=A0 =C2=A0 =C2=A0pg_basebackup
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A071241 Jul=C2=A0 6 17:19
>=C2=A0 =C2=A0 =C2=A0pg_receivewal
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A072771 Jul=C2=A0 6 17:19
>=C2=A0 =C2=A0 =C2=A0pg_recvlogical
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A030009 Jul=C2=A0 6 17:19 pg_config
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A039920 Jul=C2=A0 6 17:19
>=C2=A0 =C2=A0 =C2=A0pg_controldata
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A058438 Jul=C2=A0 6 17:19 pg_ctl
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 400623 Jul=C2=A0 6 17:19 pg_dump
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 164991 Jul=C2=A0 6 17:19 pg_restore
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A097686 Jul=C2=A0 6 17:19 pg_dumpall
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A049138 Jul=C2=A0 6 17:19 pg_resetwal
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A088205 Jul=C2=A0 6 17:19 pg_rewind
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A031798 Jul=C2=A0 6 17:19
>=C2=A0 =C2=A0 =C2=A0pg_test_fsync
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A026337 Jul=C2=A0 6 17:19
>=C2=A0 =C2=A0 =C2=A0pg_test_timing
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 130515 Jul=C2=A0 6 17:19 pg_upgrade
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A086270 Jul=C2=A0 6 17:19 pg_waldump
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 141273 Jul=C2=A0 6 17:19 pgbench
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 454216 Jul=C2=A0 6 17:19 psql
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A060635 Jul=C2=A0 6 17:19 createdb
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A056335 Jul=C2=A0 6 17:19 dropdb
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A064416 Jul=C2=A0 6 17:19 createuser
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A056305 Jul=C2=A0 6 17:19 dropuser
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A061135 Jul=C2=A0 6 17:19 clusterdb
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A068735 Jul=C2=A0 6 17:19 vacuumdb
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A064047 Jul=C2=A0 6 17:19 reindexdb
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-rwxr-xr-x. 1= shahid shahid=C2=A0 =C2=A059104 Jul=C2=A0 6 17:19 pg_isready
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Thanks
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Shahid
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Sent from: >=C2=A0 =C2=A0 =C2=A0> http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html >=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>

--0000000000006aa00a05707be11f-- From mark.kirkwood@catalyst.net.nz Sun Jul 8 12:22:26 2018 Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc8i7-0006Te-MV for pgsql-admin@arkaria.postgresql.org; Sun, 08 Jul 2018 12:22:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fc8i5-0006Ds-Ri for pgsql-admin@arkaria.postgresql.org; Sun, 08 Jul 2018 12:22:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc8i5-0006Dl-H1 for pgsql-admin@lists.postgresql.org; Sun, 08 Jul 2018 12:22:37 +0000 Received: from cat-porwal-prod-mail1.catalyst.net.nz ([202.78.240.226]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fc8i0-00076a-Bb for pgsql-admin@postgresql.org; Sun, 08 Jul 2018 12:22:35 +0000 Authentication-Results: auth=pass smtp.auth=mark.kirkwood@catalyst.net.nz smtp.mailfrom=mark.kirkwood@catalyst.net.nz Received: from [IPv6:2406:e001:cf9:1:4949:d93a:590:5a13] (unknown [IPv6:2406:e001:cf9:1:4949:d93a:590:5a13]) (Authenticated sender: mark.kirkwood@catalyst.net.nz) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTPSA id AAC51806E7; Mon, 9 Jul 2018 00:22:26 +1200 (NZST) Subject: Re: "postgres" is needed by initdb but was not found To: Mohammed Shahid Nawaz Cc: Shreeyansh Dba , pgsql-admin References: <926506.81971.qm@web65907.mail.ac4.yahoo.com> <4DAC6CEA020000250003C984@gw.wicourts.gov> <1530899160672-0.post@n3.nabble.com> <22ccdf09-a7c7-7560-67ac-1d8f07a2ace8@catalyst.net.nz> <3ed50135-9bc2-6096-09bc-97a40225c433@catalyst.net.nz> From: Mark Kirkwood Message-ID: <162f59d1-a095-d739-df1f-a3051c249c4a@catalyst.net.nz> Date: Mon, 9 Jul 2018 00:22:26 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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, > > > 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, > > > >> > > 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, > >      > > > >     > > >      >>> 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. > >     > > >     > > >     >      > >     > > >     >     On Fri, Jul 6, 2018 at 11:16 PM, mohammed shahid > >     >      > >      > > >      > >      >>> > >     >     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 > >     > > >     > > > >