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 1fbWw6-0005Lx-6D for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Jul 2018 20:02:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fbWw4-0007up-8u for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Jul 2018 20:02:32 +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 1fbWw3-0007ui-Vi for pgsql-bugs@lists.postgresql.org; Fri, 06 Jul 2018 20:02:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fbWw1-0004KW-F0; Fri, 06 Jul 2018 20:02:30 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w66K2QD8023605; Fri, 6 Jul 2018 16:02:26 -0400 From: Tom Lane To: mohammedshahid.r@gmail.com, pgsql-bugs@lists.postgresql.org, =?utf-8?q?PG_Bug_reporting_form?= Subject: Re: BUG #15265: The program "initdb" is needed by pg_ctl but was not found in the same directory as "pg_ctl". In-reply-to: <153090064731.1408.9248514053747358145@wrigleys.postgresql.org> References: <153090064731.1408.9248514053747358145@wrigleys.postgresql.org> Comments: In-reply-to =?utf-8?q?PG_Bug_reporting_form?= message dated "Fri, 06 Jul 2018 18:10:47 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <69526.1530907350.1@sss.pgh.pa.us> Date: Fri, 06 Jul 2018 16:02:30 -0400 Message-ID: <69527.1530907350@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?utf-8?q?PG_Bug_reporting_form?= writes: > sudo -u shahid ./pg_ctl -D /root/pgsql10x/data/ initdb > invalid binary "/root/pgsql10x/bin/pg_ctl" I think you would get that error if pg_ctl is unable to stat itself, which might be due to a permissions problem. Are you sure the shahid user can read/exec all the directories in that path (particularly /root)? regards, tom lane