error pg config executable not found is an error message that can occur when installing the postgres database. Several things can cause this, but the most common cause is that the postgres package is not installed on your system.
What is the error?
This error indicates that the pgc onfig executable was not found in your system path. This is required for PostgreSQL development and cannot be resolved without this executable.
What causes the error?
The error message “error pg config executable not found” is caused by a misconfiguration in the PostgreSQL settings. This can happen if the PostgreSQL version is not set correctly, or if the wrong path is set for the pgconfig executable.
To fix this, you will need to edit the PostgreSQL configuration file (postgresql.conf) and set the correct values for the following parameters:
postgresql_version – This should be set to the version of PostgreSQL that you are using. For example, 9.3 for PostgreSQL 9.3
pgconfig_executable – This should be set to the full path of the pgconfig executable. For example, /usr/local/bin/pgconfig
Once you have modified the configuration file, you will need to restart the PostgreSQL server for the changes to take effect.
How to fix the error?
The error pgconfig executable not found is a very common error when trying to install PostgreSQL on Windows. This error can be caused by a couple of different things, but the most common cause is that the PostgreSQL install path is not added to the Windows PATH environment variable. To fix this, simply add the PostgreSQL install path to the Windows PATH environment variable and restart your computer. You can do this by following these steps:
- Open the Control Panel and go to System > Advanced system settings.
- In the Advanced tab, click on Environment Variables.
- In the Environment Variables window, click on New in the System variables section.
- In the New System Variable dialog, enter PGDATA for the Variable name and C:\Program Files\PostgreSQL\9.6\data for the Variable value. Click OK to save your changes.
- In the Environment Variables window, click on New in the User variables section.
- In the New User Variable dialog, enter PATH for the Variable name and C:\Program Files\PostgreSQL\9.6\bin for the Variable value. Click OK to save your changes.
- Restart your computer for the changes to take effect and try installing PostgreSQL again
If you receive the error message “error pgconfig executable not found”, it means that the
pg_configprogram could not be found in your PATH.
pg_configis required to build PostgreSQL extensions, such as those needed for PostGIS.
There are a few ways to solve this problem:
- Add the directory containing
pg_configto your PATH. For example, if
/usr/local/bin, you can add that directory to your PATH with the following command:
- Install the
postgresql-server-dev-X.Ypackage, which will provide the necessary header files and
pg_config. For example, for PostgreSQL 9.4, you would install the
postgresql-server-dev-9.4package. Whether or not this package is available depends on your operating system; if it’s not available, try installing from source (see below).
- Install PostgreSQL from source. This will provide everything you need to build extensions, including