question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to install pg /bin/sh: 1: pg_config: not found

See original GitHub issue

pg@2.8.2 install /home/xxx/node/node_modules/pg node-gyp rebuild || (exit 0)

/bin/sh: 1: pg_config: not found gyp: Call to ‘pg_config --libdir’ returned exit status 127. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12) gyp ERR! System Linux 3.11.0-12-generic gyp ERR! command “nodejs” “/usr/bin/node-gyp” “rebuild” gyp ERR! cwd /home/rkot/node/node_modules/pg gyp ERR! node -v v0.10.15 gyp ERR! node-gyp -v v0.10.9 gyp ERR! not ok pg@2.8.2 node_modules/pg ├── generic-pool@2.0.3 └── buffer-writer@1.0.0 (async@0.2.9, cloned@0.0.1)

nodejs -v v0.10.15 npm -v 1.2.18

Any idea how to fix it?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:5

github_iconTop GitHub Comments

6reactions
harrisonlocommented, Sep 28, 2017

Does anyone know what’s the fix for mac users? (What’s the mac equivalent for apt-get install libpq-dev?)

5reactions
jose-nunezcommented, Jun 17, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

python - pg_config executable not found
1 ) PostgreSQL(development or any stable version) should be installed before installing psycopg2. 2) The pg_config file (this file normally resides in the...
Read more >
Error: pg_config executable not found | How to fix
Solution 3. For CentOS, first install sudo yum install postgresql postgresql-devel python-devel. For Ubuntu just use the equivilent apt- ...
Read more >
How To Fix - "Error: pg_config executable not found" in ...
First thing first, it is assumed that you had installed postgresql ... Check the availability of pg_config file in one of the below...
Read more >
pg_config executable not found. (psycopg2 for postgres in ...
failed to solve: executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1. requirements.txt file. asgiref==3.5.2. Django==4.1.2.
Read more >
pg_config executable not found
In this tutorial, we will learn how to resolve the “pg_config executable not found” error. Cause #1 – Add PostgreSQL binaries to Path....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found