Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Why can't I install PostGreSQL on my Mac?

Why can't I install PostGreSQL on my Mac?

Problem

I'm trying to install PostGreSQL on my Mac (Mac OS 10.6.8 Snow Leopard) and I keep getting this error:

$ npm install pg
npm http GET https://registry.npmjs.org/pg
npm http 304 https://registry.npmjs.org/pg
npm http GET https://registry.npmjs.org/generic-pool/1.0.7
npm http 304 https://registry.npmjs.org/generic-pool/1.0.7

> [email protected] install /Users/omegatai/node_modules/pg
> node-waf configure build || (exit 0)

Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : ok /usr/local/lib/node 
Checking for node prefix                 : ok /usr/local 
Checking for program pg_config           : not found 
/Users/omegatai/node_modules/pg/wscript:16: error: The program ['pg_config'] is required
[email protected] ./node_modules/pg 
└── [email protected]

What is pg_config? How can I fix this issue? Thanks!

Problem courtesy of: Michael Eilers Smith

Solution

The pg_config program is normally installed as part of the PostgreSQL server installation. On the other hand, you appear to be installing a client library which expects that a server is already installed.

Head over to http://www.postgresql.org/ and install the PostgreSQL server first.

Solution courtesy of: Greg Hewgill

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Why can't I install PostGreSQL on my Mac?

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×