Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pg_config executable not found when using pgxnclient on Windows 7 x64

I installed Python 2.7.8 and pgxn client. And I tried to run this statement from command line from the bin folder and path is setup correctly

pgxnclient install  http://api.pgxn.org/dist/pg_repack/1.2.1/pg_repack-1.2.1.zip

But I got an error pg_config executable not found.

like image 999
Mladen Uzelac Avatar asked Nov 03 '14 15:11

Mladen Uzelac


People also ask

Where is PG Config windows?

Open the postgresql. conf configuration file. This file is located at %postgresql_dir%\data . Here %postgresql_dir% (for example, C:\Program Files\PostgreSQL\11 ) is the folder that PostgreSQL was installed in.

What is Pg_config file?

The view pg_config describes the compile-time configuration parameters of the currently installed version of PostgreSQL. It is intended, for example, to be used by software packages that want to interface to PostgreSQL to facilitate finding the required header files and libraries.


2 Answers

Bakground: pg_config is the configuration utility provided by PostgreSQL. This utility is used by various applications.

Solution:

  1. Install PostgreSQL.
  2. Set the path. System Properties > Advanced

    PATH:C:\Program Files (x86)\PostgreSQL\9.4\bin\;

From this point on, any application that requires pg_config can find it here.

I suggest this method because the build is directly from the author. You can also find viable alternatives for standalone pg_config builds.

like image 131
Rahul Avatar answered Sep 23 '22 19:09

Rahul


I had this same error, and pg_config was in my path

You can try

pgxnclient install --pg_config "c:\path\to\pg_config.exe" $extensionName

You almost definitely need to run cmd.exe as an admin

like image 44
Neil McGuigan Avatar answered Sep 21 '22 19:09

Neil McGuigan