From: theLemcke Date: 2011-03-01T03:55:25+09:00 Subject: Re: Trying to install pg on 32bit Snow Leopard 10.6 On Feb 28, 9:32 am, Daniel Gaytán wrote: > [Note:  parts of this message were removed to make it a legal post.] > > Try to use Homebrew: > > http://mxcl.github.com/homebrew/http://blog.clearto.me/2010/04/29/postgresql_on_snow_leopard_with_rai... > > Enjoy! > > Daniel G. > > 2011/2/28 theLemcke > > > > > > > > > I'm trying to install the "pg" gem on 32-bit snow leopard and I'm > > encountering the following error: > > > $ sudo env ARCHFLAGS="-arch i386" gem install pg -v=0.9.0 > > Building native extensions.  This could take a while... > > ERROR:  Error installing pg: > >        ERROR: Failed to build gem native extension. > > > /opt/local/bin/ruby extconf.rb > > checking for pg_config... yes > > MacOS X build: fixing architecture flags: > >  using the value in ARCHFLAGS environment variable ("-arch i386"). > > 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) > > *** extconf.rb failed *** > > Could not create Makefile due to some reason, probably lack of > > necessary libraries and/or headers.  Check the mkmf.log file for more > > details.  You may need configuration options. > > > Provided configuration options: > >        --with-opt-dir > >        --with-opt-include > >        --without-opt-include=${opt-dir}/include > >        --with-opt-lib > >        --without-opt-lib=${opt-dir}/lib > >        --with-make-prog > >        --without-make-prog > >        --srcdir=. > >        --curdir > >        --ruby=/opt/local/bin/ruby > >        --with-pg > >        --without-pg > >        --with-pg-config > >        --without-pg-config > >        --with-pg-dir > >        --without-pg-dir > >        --with-pg-include > >        --without-pg-include=${pg-dir}/include > >        --with-pg-lib > >        --without-pg-lib=${pg-dir}/lib > >        --enable-static-build > >        --disable-static-build > >        --with-pqlib > >        --without-pqlib > >        --with-libpqlib > >        --without-libpqlib > >        --with-ms/libpqlib > >        --without-ms/libpqlib > > > Any suggestions or help? Any other suggestions? I already have port installed and it's difficult to manage both at the same time.