PostgreSQL  - 讨论区

标题:在包含自 psycopg/psycopgmodule.c:32 的文件中:

2010年11月09日 星期二 16:16

[root@localhost psycopg2-2.2.2]# python setup.py install

running install

running build

running build_py

running build_ext

Warning: Unable to find 'pg_config' filebuilding 'psycopg2._psycopg' extension

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.2.2 (dt dec ext pq3)" -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -DHAVE_PQPROTOCOL3=1 -I/usr/local/include/python2.6 -I. -c psycopg/psycopgmodule.c -o build/temp.linux-i686-2.6/psycopg/psycopgmodule.o -Wdeclaration-after-statement

在包含自 psycopg/psycopgmodule.c:32 的文件中:

./psycopg/psycopg.h:31:22: 错误:libpq-fe.h:没有那个文件或目录

In file included from psycopg/psycopgmodule.c:33:

./psycopg/connection.h:95: 错误:expected specifier-qualifier-list before ‘PGconn’

./psycopg/connection.h:116: 错误:expected ‘)’ before ‘*’ token

./psycopg/connection.h:117: 错误:expected ‘)’ before ‘*’ token

./psycopg/connection.h:118: 错误:expected ‘)’ before ‘*’ token

./psycopg/connection.h:119: 错误:expected ‘)’ before ‘*’ token

./psycopg/connection.h:123: 错误:expected declaration specifiers or ‘...’ before ‘PGconn’

In file included from psycopg/psycopgmodule.c:34:

./psycopg/cursor.h:60: 错误:expected specifier-qualifier-list before ‘PGresult’

In file included from psycopg/psycopgmodule.c:35:

./psycopg/green.h:63: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token

在包含自 psycopg/psycopgmodule.c:36 的文件中:

./psycopg/lobject.h:31:28: 错误:libpq/libpq-fs.h:没有那个文件或目录

In file included from psycopg/psycopgmodule.c:36:

./psycopg/lobject.h:51: 错误:expected specifier-qualifier-list before ‘Oid’

./psycopg/lobject.h:57: 错误:expected declaration specifiers or ‘...’ before ‘Oid’

./psycopg/lobject.h:57: 错误:expected declaration specifiers or ‘...’ before ‘Oid’

psycopg/psycopgmodule.c: In function ‘psyco_register_type’:

psycopg/psycopgmodule.c:269: 错误:‘cursorObject’ 没有名为 ‘string_types’ 的成员

psycopg/psycopgmodule.c:272: 错误:‘connectionObject’ 没有名为 ‘string_types’ 的成员

error: command 'gcc' failed with exit status 1


2010年11月09日 星期二 17:14

装一下libpq-dev试试

2010年11月09日 星期二 19:52

我的系统是CentOS,使用 yum install libpq-dev找不到,easy_install也找不到,看到其他Debian系列的可以使用apt-get install libpq-dev,难道centos就是个悲剧?

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2024

    京ICP备05028076号