2012-04-26 35 views
2

我遇到了與I'm trying to install psycopg2 onto Mac OS 10.6.3; it claims it can't find "stdarg.h" but I can see it's there; what should I do?(我在OS X 10.7和PostgreSQL v 9.0.5中除外)非常類似的問題,我在考慮更改我的psql配置c編譯器。更改pg_config

當我在終端上鍵入pg_config我得到:

BINDIR = /usr/bin 
DOCDIR = /usr/share/doc/postgresql 
HTMLDIR = /Library/WebServer/Documents/postgresql 
INCLUDEDIR = /usr/include 
PKGINCLUDEDIR = /usr/include/postgresql 
INCLUDEDIR-SERVER = /usr/include/postgresql/server 
LIBDIR = /usr/lib 
PKGLIBDIR = /usr/lib/postgresql 
LOCALEDIR = /usr/share/locale 
MANDIR = /usr/share/man 
SHAREDIR = /usr/share/postgresql 
SYSCONFDIR = /private/etc/postgresql 
PGXS = /usr/lib/postgresql/pgxs/src/makefiles/pgxs.mk 
CONFIGURE = '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--prefix=/usr' '--sbindir=/usr/libexec' '--sysconfdir=/private/etc' '--localstatedir=/var/pgsql' '--htmldir=/Library/WebServer/Documents/postgresql' '--enable-thread-safety' '--enable-dtrace' '--with-tcl' '--with-perl' '--with-python' '--with-gssapi' '--with-krb5' '--with-pam' '--with-ldap' '--with-bonjour' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-system-tzdata=/usr/share/zoneinfo' 'CFLAGS=-arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations' 'LDFLAGS=-arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations' 'LDFLAGS_EX=-mdynamic-no-pic' 
CC = gcc 
CPPFLAGS = -I/usr/include/libxml2 
CFLAGS = -arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv 
CFLAGS_SL = 
LDFLAGS = -arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations -Wl,-dead_strip_dylibs 
LDFLAGS_EX = -mdynamic-no-pic 
LDFLAGS_SL = 
LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm 
VERSION = PostgreSQL 9.0.5 

我不知道如何改變pg_config(這樣我就可以設置CC = GCC-4.2)或類似的規定。

回答

1

pg_config只是一個提供信息的實用程序,它不是典型意義上的「配置」,您可以編輯屬性。如果您想更改pg_config提供的值,則需要在util外面手動執行此操作(在您的情況下,您需要安裝新的C編譯器)。