- 论坛徽章:
- 0
|
我已经用ports安装好postgresql 8.4,以root用户执行pg_config得到结果如下:
BINDIR = /usr/local/bin
DOCDIR = /usr/local/share/doc/postgresql
HTMLDIR = /usr/local/share/doc/postgresql
INCLUDEDIR = /usr/local/include
PKGINCLUDEDIR = /usr/local/include/postgresql
INCLUDEDIR-SERVER = /usr/local/include/postgresql/server
LIBDIR = /usr/local/lib
PKGLIBDIR = /usr/local/lib/postgresql
LOCALEDIR = /usr/local/share/locale
MANDIR = /usr/local/man
SHAREDIR = /usr/local/share/postgresql
SYSCONFDIR = /usr/local/etc/postgresql
PGXS = /usr/local/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-libraries=/usr/local/lib' '--with-includes=/usr/local/include' '--enable-thread-safety' '--with-openssl' '--with-system-tzdata=/usr/share/zoneinfo' '--enable-nls' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd7.2' 'build_alias=i386-portbld-freebsd7.2' 'CC=cc' 'CFLAGS=-O2 -fno-strict-aliasing -pipe -O3 -funroll-loops' 'LDFLAGS= -pthread -rpath=/usr/lib:/usr/local/lib'
CC = cc
CPPFLAGS = -I/usr/local/include
CFLAGS = -O2 -fno-strict-aliasing -pipe -O3 -funroll-loops -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL = -fPIC -DPIC
LDFLAGS = -pthread -rpath=/usr/lib:/usr/local/lib -L/usr/local/lib -Wl,--as-needed -Wl,-R'/usr/local/lib'
LDFLAGS_SL =
LIBS = -lpgport -lintl -lssl -lcrypto -lz -lreadline -lcrypt -lm
VERSION = PostgreSQL 8.4.0
然后,我试图去安装psycopg2:
cd /usr/ports/databases/py-psycopg2
make install clean
得到以下错误:
===> Building for py26-psycopg2-2.0.11
running build
running build_py
running build_ext
building 'psycopg2._psycopg' extension
cc -fno-strict-aliasing -DNDEBUG -O2 -fno-strict-aliasing -pipe -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000 -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.0.11 (dt dec ext pq3)" -DPG_VERSION_HEX=0x080400 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -DHAVE_PQPROTOCOL3=1 -I/usr/local/include/python2.6 -I. -I/usr/local/include -I/usr/local/include/postgresql/server -c psycopg/psycopgmodule.c -o build/temp.freebsd-7.2-RELEASE-i386-2.6/psycopg/psycopgmodule.o
In file included from psycopg/psycopgmodule.c:23:
/usr/local/include/python2.6/Python.h:168:17: error: pth.h: No such file or directory
error: command 'cc' failed with exit status 1
*** Error code 1
Stop in /usr/ports/databases/py-psycopg2.
然后我再尝试使用源代码自己编译,尝试了0.8,0.9,0.10均无法成功,卸载pg8.4改为8.3也不行。
但是错误提示的pth.h存在于/usr/local/include/pth/目录下,我不清楚该如何指向,望高手能指点!
多谢!
BTW:所使用的操作系统是FreeBSD 7.2,Python是2.6
[ 本帖最后由 magic22cn 于 2009-7-17 14:58 编辑 ] |
|