简体   繁体   English

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

[英]OpenSuse 11 version `GLIBC_2.14' not found

I'm trying to get a script working in Python on a Suse Linux Server (OpenSuse 11):我试图让一个脚本在 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)

and getting this error:并收到此错误:

> 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)

I checked using this command:我使用以下命令进行了检查:

/lib64/libc.so.6

and getting this:得到这个:

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

So I assume 2.14 is not installed, therefore I need to install it, but how to?所以我假设 2.14 没有安装,所以我需要安装它,但是如何安装呢? I'm not quite familiar with OpenSuse, I was trying zypper but it doesn't find the package:我对 OpenSuse 不太熟悉,我正在尝试 zypper 但它没有找到 package:

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

Nothing to do.

Thanks,谢谢,

So I assume 2.14 is not installed所以我假设没有安装 2.14

Correct.正确的。

therefore I need to install it,因此我需要安装它,

No: it doesn't follow that you need to install GLIBC-2.14.否:这并不意味着您需要安装 GLIBC-2.14。

What you should do instead is either obtain or build from source the psycopg2 package targeting your system and your version of GLIBC.相反,您应该做的是从源代码获取或构建针对您的系统和 GLIBC 版本的psycopg2 package。

I have no clue, this server was set up a couple of years ago and there was no documentation left我不知道,这台服务器是几年前建立的,没有留下任何文件

Whoever did this setup had no clue either.进行此设置的人也不知道。 Rather than making hacks which may work some of the time, or may break something else, you should do sane thing: either upgrade the entire server to some recent distribution, or install software appropriate for your old one.与其做一些可能在某些时候奏效或破坏其他东西的黑客行为,不如做一些理智的事情:要么将整个服务器升级到某个最近的发行版,要么安装适合你旧版本的软件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM