[问题]gcc编译的问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
vera1171
帖子: 2
注册时间: 2008-07-31 10:23

[问题]gcc编译的问题

#1

帖子 vera1171 » 2008-08-15 10:35

纯菜鸟一枚,请大家多多帮助……

指导上是这样说的:
$ cvs -d :pserver:anon@cvs.planet-lab.org:/cvs checkout new_plc_api
$ cd new_plc_api
$ make

但是当我运行make之后出现这样的错误:
anqin@anqin-desktop:~/planetlab/hello_world/new_plc_api$ make
make: curl-config:命令未找到
printf: 0x:给定值不能完全转换
cd psycopg2 && \
python setup.py build && \
python setup.py install_lib --install-dir=/home/anqin/planetlab/hello_world/new_plc_api
running build
running build_py
running build_ext
Warning: /bin/sh: pg_config: not found
building 'psycopg2._psycopg' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPY_MAJOR_VERSION=2 -DPY_MINOR_VERSION=5 -DHAVE_PYBOOL=1 -DHAVE_DECIMAL=1 -DHAVE_MXDATETIME=1 -DHAVE_PYDATETIME=1 -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.0.5.1 (dec mx dt ext pq3)" -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_DISPLAY_SIZE=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -DHAVE_PQPROTOCOL3=1 -I/usr/include/python2.5/mx -I/usr/include/python2.5 -I. -c psycopg/psycopgmodule.c -o build/temp.linux-i686-2.5/psycopg/psycopgmodule.o
在包含自 psycopg/psycopgmodule.c:28 的文件中:
./psycopg/connection.h:26:22: 错误: libpq-fe.h:没有该文件或目录
In file included from psycopg/psycopgmodule.c:28:
./psycopg/connection.h:55: 错误: expected specifier-qualifier-list before ‘PGconn’
In file included from psycopg/psycopgmodule.c:29:
./psycopg/cursor.h:55: 错误: expected specifier-qualifier-list before ‘PGresult’
psycopg/psycopgmodule.c: 在函数‘_psyco_connect_fill_exc’中:
psycopg/psycopgmodule.c:103: 错误: ‘connectionObject’没有名为‘exc_Error’的成员
psycopg/psycopgmodule.c:105: 错误: ‘connectionObject’没有名为‘exc_Warning’的成员
psycopg/psycopgmodule.c:107: 错误: ‘connectionObject’没有名为‘exc_InterfaceError’的成员
psycopg/psycopgmodule.c:109: 错误: ‘connectionObject’没有名为‘exc_DatabaseError’的成员
psycopg/psycopgmodule.c:111: 错误: ‘connectionObject’没有名为‘exc_InternalError’的成员
psycopg/psycopgmodule.c:113: 错误: ‘connectionObject’没有名为‘exc_ProgrammingError’的成员
psycopg/psycopgmodule.c:115: 错误: ‘connectionObject’没有名为‘exc_IntegrityError’的成员
psycopg/psycopgmodule.c:117: 错误: ‘connectionObject’没有名为‘exc_DataError’的成员
psycopg/psycopgmodule.c:119: 错误: ‘connectionObject’没有名为‘exc_NotSupportedError’的成员
psycopg/psycopgmodule.c:121: 错误: ‘connectionObject’没有名为‘exc_OperationalError’的成员
error: command 'gcc' failed with exit status 1
make: *** [psycopg2] 错误 1
请问是怎么回事呢?应该怎么解决?
cvgmt
帖子: 322
注册时间: 2007-02-26 2:29
来自: 广东

#2

帖子 cvgmt » 2008-08-15 16:40

先试试
sudo apt-get install build-essential
sudo apt-get build-dep new_plc_api
头像
lyre
帖子: 77
注册时间: 2005-06-28 18:08

#3

帖子 lyre » 2008-08-15 17:57

./psycopg/connection.h:26:22: 错误: libpq-fe.h:没有该文件或目录

这个头文件,似乎是属于PostgreSQL的devel包的……具体叫什么我不知道
回复