未找到 OpenSuse 11 版本“GLIBC_2.14”

OpenSuse 11 version `GLIBC_2.14' not found

我正在尝试让脚本在 Suse Linux 服务器 (OpenSuse 11) 上的 Python 中运行:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
import select
import psycopg2
import psycopg2.extensions
 
dbc = psycopg2.connect(database='depesz', host='127.0.0.1', port=5920)
dbc.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT)
cur = dbc.cursor()
cur.execute('LISTEN new_user')
 
while 1:
    if not select.select([dbc], [], [], 5) == ([], [], []):
        dbc.poll()
        while dbc.notifies:
            notify = dbc.notifies.pop()
            print "new_user %s, backed: %d" % (notify.payload, notify.pid)

并出现此错误:

> Traceback (most recent call last):   File "test_email.py", line 5, in  <module>
>     import psycopg2   File "/usr/local/lib/python2.7/site-packages/psycopg2/__init__.py", line
> 50, in <module>
>     from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: /lib64/libc.so.6: **version `GLIBC_2.14' not found**
> (required by
> /usr/local/lib/python2.7/site-packages/psycopg2/_psycopg.so)

我用这个命令检查过:

/lib64/libc.so.6

得到这个:

GNU C Library stable release version 2.11.1 (20100118), ...

所以我假设没有安装 2.14,因此我需要安装它,但是如何安装? 我对 OpenSuse 不是很熟悉,我正在尝试使用 zypper 但它找不到包:

zypper in libc6
Loading repository data...
Reading installed packages...
'libc6' not found.
Resolving package dependencies...

Nothing to do.

谢谢,

So I assume 2.14 is not installed

正确。

therefore I need to install it,

否:这并不意味着您需要安装 GLIBC-2.14。

应该做的是从源获取或构建psycopg2定位你的系统和你的 GLIBC 版本。

I have no clue, this server was set up a couple of years ago and there was no documentation left

谁做的这个设置也不知道。你应该做一些理智的事情,而不是做一些有时可能奏效的黑客攻击,或者可能会破坏其他东西:要么将整个服务器升级到某个最新的发行版,要么安装适合你的旧版本的软件。