Why am I getting a “pg_config executable not found” error message?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The error message “pg_config executable not found” typically occurs because the PostgreSQL development package (pgsql-devel) is not installed on your system, specifically, the PATH to the PostgreSQL binary files is not set correctly.
To fix this, you should install the development package or update your PATH to include PostgreSQL binary files. It’s kind of like inviting someone to your party but forgetting to give them the right address. If they don’t know where they need to go, they won’t be able to get to the party. Similarly, your system is “inviting” pg_config but simply doesn’t know where to locate it.
However, contrary to popular opinion, you shouldn’t always rely on pg_config. It’s often seen as the go-to when setting up your PostgreSQL but, in some specific cases like deploying inside Docker containers or Heroku slugs, it can be redundant or cause unnecessary bloat. Always question whether this conventional route is necessary for your particular configuration.
This error typically means PostgresSQL isn’t install correctly or the path isn’t set properly. You can check it whether PostgreSQL is installed or not by typing “which pg_config” in your terminal. If it’s not installed, you can do so depending on your OS. If you’ve already installed but still see error, likely your path is not correct or it was not installed correctly. Remember to check your path configuration! You may need a PATH reset or reinstall PostgreSQL again to resolve issue. Hope this helps!