mottalrd
mottalrd

Reputation: 4490

Error while installing PostgreSQL ODBC - libpq library not found

I am trying to install the Postgres ODBC driver on my Mac.
I installed postgres 8.4 with brew.

I downloaded the ODBC driver from here.
http://ftp.postgresql.org/pub/odbc/versions/src/

Then I run

./configure

but I get

configure: error: libpq library not found

however looks like the library is installed, in fact

:~/Downloads/psqlodbc-08.04.0200$ find / -name "libpq.a" 2>/dev/null
/Library/PostgreSQL/8.4/lib/libpq.a

this is the output of my 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

any idea? thank you for your help

Upvotes: 0

Views: 7841

Answers (1)

Eddy López
Eddy López

Reputation: 351

I was installing psqlodbc-09.06.0200 and I got the same problem so I Installed PostgreSQL 9.6.2 with brew

brew install postgresql 

You'll get the libpq-dev and libpq libraries. Follow the installation:

./configure
make
make install 

and that's all

Upvotes: 1

Related Questions