From: Tor Erik Linnerud Date: 2010-03-04T23:35:42+09:00 Subject: Re: Installing Pg gem for PostGreSQL 8.4 > checking for pg_config... yes > checking for libpq-fe.h... yes > checking for libpq/libpq-fs.h... yes > checking for PQconnectdb() in -lpq... no > checking for PQconnectdb() in -llibpq... no > checking for PQconnectdb() in -lms/libpq... no > Can't find the PostgreSQL client library (libpq) I am having the exact same problem on a fresh install on Snow Leopard with Ruby 1.9.1p376 and postgres installed via homebrew. This is the last entry from mkmf.log gcc -o conftest -I/Users/tel/.rvm/rubies/ruby-1.9.1-p376/include/ruby-1.9.1/i386-darwin10.2.0 -I/Users/tel/.rvm/rubies/ruby-1.9.1-p376/include/ruby-1.9.1/ruby/backward -I/Users/tel/.rvm/rubies/ruby-1.9.1-p376/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/homebrew/Cellar/postgresql/8.4.2/include -O2 -g -Wall -Wno-parentheses -pipe -fno-common -arch i386 conftest.c -L. -L/Users/tel/.rvm/rubies/ruby-1.9.1-p376/lib -L. -L/usr/local/homebrew/Cellar/postgresql/8.4.2/lib -arch i386 -lruby-static -lms/libpq -lpthread -ldl -lobjc " conftest.c: In function ‘t’: conftest.c:5: warning: implicit declaration of function ‘PQconnectdb’ ld: library not found for -lms/libpq collect2: ld returned 1 exit status checked program was: /* begin */ 1: #include "ruby.h" 2: 3: /*top*/ 4: int main() {return 0;} 5: int t() { PQconnectdb(); return 0; } /* end */ Tor Erik -- Posted via http://www.ruby-forum.com/.