Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.(5)

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

ITtutoria

ITtutoria Logo ITtutoria Logo

ITtutoria Navigation

  • Python
  • Java
  • Reactjs
  • JavaScript
  • R
  • PySpark
  • MYSQL
  • Pandas
  • QA
  • C++
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA
Home/ Questions/Fixing the error: error: pg_config executable not found
Next
Answered
Kaleb Thomas
  • 10
Kaleb Thomas
Asked: May 18, 20222022-05-18T06:52:22+00:00 2022-05-18T06:52:22+00:00In: python

Fixing the error: error: pg_config executable not found

  • 10

. Advertisement .

..3..

. Advertisement .

..4..

I get the error message:

Error: pg_config executable not found.
 
 Please add the directory containing pg_config to the PATH
 
 or specify the full executable path with the option:
 
 
 
  python setup.py build_ext --pg-config /path/to/pg_config build ...
 
 
 
 or with the pg_config option in 'setup.cfg'.
 
 ----------------------------------------
 Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/psycopg2
Error: Unable to find 'pg_config' file in '/usr/pgsql-9.1/bin/'

Has anyone ever faced this problem? How to troubleshoot the “error: pg_config executable not found..” The problem appears when I try to operate the following program:

$ which pg_config
 /usr/pgsql-9.1/bin/pg_config

pg_config executable not found
  • 2 2 Answers
  • 55 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

2 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. Best Answer
    hdtutoria Expert
    2022-06-05T03:21:34+00:00Added an answer on June 5, 2022 at 3:21 am

    The cause:  I think this error occurs because you haven’t installed libpq-dev/postgresql-libs.

    The solution: To connect with a PostgreSQL database backend, you must install libpq-dev/postgresql-libs, which contains header files and a static library for generating C applications to link with the libpq library.

    On Arch this will run:

    $ sudo pacman -S postgresql-libs

    On Debian and Ubuntu:

    $ sudo apt-get install libpq-dev
    

    On Mac OS X:

    $ brew install postgresql

    On Red Hat/CentOS/Fedora:

    $ sudo yum install postgresql-devel
    • 14
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Gabriel Dumont
    2022-05-25T20:10:17+00:00Added an answer on May 25, 2022 at 8:10 pm

    pg_config is in postgresql-devel (libpq-dev in Debian/Ubuntu, libpq-devel on Centos/Fedora/Cygwin/Babun.)

    • 8
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question
  • How to Split String by space in C++
  • How To Convert A Pandas DataFrame Column To A List
  • How to Replace Multiple Characters in A String in Python?
  • How To Remove Special Characters From String Python

Explore

  • Home
  • Tutorial

Footer

ITtutoria

ITtutoria

This website is user friendly and will facilitate transferring knowledge. It would be useful for a self-initiated learning process.

@ ITTutoria Co Ltd.

Tutorial

  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA

Legal Stuff

  • About Us
  • Terms of Use
  • Privacy Policy
  • Contact Us

DMCA.com Protection Status

Help

  • Knowledge Base
  • Support

Follow

© 2022 Ittutoria. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.