Unable to install pg /bin/sh: 1: pg_config: not found
See original GitHub issuepg@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:
- Created 10 years ago
- Comments:5
Top GitHub Comments
Does anyone know what’s the fix for mac users? (What’s the mac equivalent for apt-get install libpq-dev?)
Hey @harrison0723 this worked for me:
brew install postgresql
https://superuser.com/questions/296873/install-libpq-dev-on-mac-os