找不到PostgreSQL客户端库(libpq)
我正在尝试在Mac OS X 10.6上安装PostgreSQL for Rails。首先我尝试了MacPorts安装,但是进展不顺利,所以我做了一键式DMG安装。这似乎有效。
我怀疑我需要安装PostgreSQL开发包,但我不知道如何在OS X上执行此操作。
这是我尝试做的事情sudo gem install pg
:
$ sudo gem install pgBuilding native extensions. This could take a while...ERROR: Error installing pg: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb checking for pg_config... yesUsing config values from /Library/PostgreSQL/8.3/bin/pg_config checking for libpq-fe.h... yes checking for libpq/libpq-fs.h... yes checking for PQconnectdb() in -lpq... nochecking for PQconnectdb() in -llibpq... nochecking for PQconnectdb() in -lms/libpq... noCan'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 --without-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=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby --with-pg --without-pg --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib --with-pg-config --without-pg-config --with-pg_config --without-pg_config --with-pqlib --without-pqlib --with-libpqlib --without-libpqlib --with-ms/libpqlib --without-ms/libpqlib Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/pg-0.11.0 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/pg-0.11.0/ext/gem_make.out
慕婉清6462132
相关分类