postgresql 导入错误:/lib/libc.so.6:未找到版本“GLIBC_2.14”(/usr/lib/libpq.so.5 需要)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37525884/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 02:17:55  来源:igfitidea点击:

ImportError: /lib/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib/libpq.so.5)

postgresqlpsycopg2glibcrhellibpq

提问by cppnoob

I have to run a tornado webapp on a server using psycopg2 with postgresql as backend. I am working on Red Hat Enterprise Linux Server release 6.5. I set up a virtual environment. Now, on this server, i don't have root access, i can't use pip or yum and i can't copy text from the server(so i can't post the exact error log). I have been manually downloading tar files for the libraries and installing them. When i try to run the webapp, i get the following error:

我必须在使用 psycopg2 和 postgresql 作为后端的服务器上运行龙卷风 web 应用程序。我正在开发 Red Hat Enterprise Linux Server 6.5 版。我设置了一个虚拟环境。现在,在这台服务器上,我没有 root 访问权限,我无法使用 pip 或 yum,也无法从服务器复制文本(因此我无法发布确切的错误日志)。我一直在手动下载库的 tar 文件并安装它们。当我尝试运行 webapp 时,出现以下错误:

ImportError: /lib/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib/libpq.so.5)

The version for libc.so.6 is 2.12. The error is displayed in psycopg2/init.py.

libc.so.6 的版本是 2.12。错误显示在 psycopg2/ init.py 中。

I apologize as this is not much to go on, but the server has a lot of restrictions. Any help will be appreciated.

我很抱歉,因为这没什么可做的,但是服务器有很多限制。任何帮助将不胜感激。

回答by Employed Russian

This error:

这个错误:

ImportError: /lib/libc.so.6: version `GLIBC_2.14' not found \
  (required by /usr/lib/libpq.so.5)

means that libpq.so.5was built on a system with GLIBC-2.14or above.

表示libpq.so.5建立在具有GLIBC-2.14或更高版本的系统上。

Since you claim to not have root privilege on this system, and since /usr/libis not writable by regular users, we must assume that you've asked the sysadmin on this system to install something for you, and the sysadmin installed a non-working PostgreSQL package.

由于您声称在此系统上没有 root 权限,并且/usr/lib普通用户不可写,因此我们必须假设您已要求此系统上的系统管理员为您安装某些东西,并且系统管理员安装了一个不起作用的 PostgreSQL 包.

There is no easy way you can fix this problem yourself.

没有简单的方法可以自己解决这个问题。

You should work with your sysadmin to install correct packages for your system.

您应该与系统管理员合作,为您的系统安装正确的软件包。

Alternatively, you can build install and use a newer version of GLIBC in non-default location. This is quite non-trivial. Some details here.

或者,您可以在非默认位置构建安装并使用更新版本的 GLIBC。这是非常重要的。一些细节在这里