我正在尝试在Mac上安装Postgres ODBC驱动程序 我用brew安装了postgres 8.4。
我从这里下载了ODBC驱动程序 http://ftp.postgresql.org/pub/odbc/versions/src/
然后我跑
./configure
但我得到
configure: error: libpq library not found
然而看起来像是安装了库,实际上
:~/Downloads/psqlodbc-08.04.0200$ find / -name "libpq.a" 2>/dev/null
/Library/PostgreSQL/8.4/lib/libpq.a
这是我的pg_conf
的输出:~/Downloads/psqlodbc-08.04.0200$ pg_config
BINDIR = /Library/PostgreSQL/8.4/bin
DOCDIR = /Library/PostgreSQL/8.4/doc/postgresql
HTMLDIR = /Library/PostgreSQL/8.4/doc/postgresql
INCLUDEDIR = /Library/PostgreSQL/8.4/include
PKGINCLUDEDIR = /Library/PostgreSQL/8.4/include/postgresql
INCLUDEDIR-SERVER = /Library/PostgreSQL/8.4/include/postgresql/server
LIBDIR = /Library/PostgreSQL/8.4/lib
PKGLIBDIR = /Library/PostgreSQL/8.4/lib/postgresql
LOCALEDIR = /Library/PostgreSQL/8.4/share/locale
MANDIR = /Library/PostgreSQL/8.4/share/man
SHAREDIR = /Library/PostgreSQL/8.4/share/postgresql
SYSCONFDIR = /Library/PostgreSQL/8.4/etc/postgresql
PGXS = /Library/PostgreSQL/8.4/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--prefix=/Users/buildfarm/pginstaller/server/staging/osx' '--with-openssl' '--with-perl' '--with-python' '--with-tcl' '--with-bonjour' '--with-pam' '--with-krb5' '--enable-thread-safety' '--with-libxml' '--with-ossp-uuid' '--with-includes=/usr/local/include/libxml2:/usr/local/include' '--docdir=/Users/buildfarm/pginstaller/server/staging/osx/doc/postgresql' '--with-libxslt' 'CFLAGS=-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -headerpad_max_install_names -arch ppc -arch i386' 'LDFLAGS=-L/usr/local/lib'
CC = gcc -no-cpp-precomp
CPPFLAGS = -I/usr/include/libxml2 -I/usr/local/include/libxml2 -I/usr/local/include
CFLAGS = -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -headerpad_max_install_names -arch ppc -arch i386 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL =
LDFLAGS = -L/usr/local/lib -L/usr/lib
LDFLAGS_SL =
LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lz -lreadline -lm
VERSION = PostgreSQL 8.4.18
任何想法?谢谢你的帮助
答案 0 :(得分:1)
我正在安装psqlodbc-09.06.0200,我遇到了同样的问题所以我用Brew安装PostgreSQL 9.6.2
brew install postgresql
您将获得libpq-dev和libpq库。按照安装:
./configure
make
make install
那就是