我刚刚编译并安装了postgres9.2.1的一个实例。以及python2.7.3。在OpenSuSE 12.2上,运行在xeon服务器上。然后我下载了pygresql并尝试使用pgdb连接到数据库,但这导致python崩溃。以下是线索:
Retrieving package PyGreSQL-4.0-200.1.2.x86_64 (1/1), 85.0 KiB (402.1 KiB unpacked)
Retrieving: PyGreSQL-4.0-200.1.2.x86_64.rpm ........................................................[done]
Installing: PyGreSQL-4.0-200.1.2 ...................................................................[done]
rikki:~/Downloads # python
Python 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pgdb
>>> c=pgdb.connect()
Segmentation fault
使用除“”或localhost或works“OK”之外的任何内容。在
^{pr2}$数据库可访问: rikki:~/下载#psql-U cw psql(9.2.2) 键入“help”可获得帮助。在
cw=# select now();
now
------------------------------
2013-05-14 09:08:49.54825-07
(1 row)
cw=#
同时,我有一个类似的安装,工作良好的桌面。在
我应该在安装中检查什么?在
谢谢。在
--EDIT--尝试使用psycopg2-2.5-py2.7
会产生相同类型的错误:
>>> con=psycopg2.connect(host="z",db="cw",user="cw")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib64/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
psycopg2.OperationalError: invalid connection option "db"
>>> con=psycopg2.connect(host="localhost",database="cw",user="cw")
Segmentation fault
目前没有回答
相关问题 更多 >
编程相关推荐