简体   繁体   English

更新glibc之后:分段错误(核心已转储)

[英]After updating glibc: Segmentation fault (core dumped)

I've been using centos 6.5. 我一直在使用centos 6.5。 And after I used the yum to update my glibc. 在使用yum更新我的glibc之后。

yum update glibc

I found that my "yum" command as well as my "python" command will throw error as follows: 我发现我的“ yum”命令以及我的“ python”命令将引发以下错误: 在此处输入图片说明

I' ve tired other shell commands like: ls ll ln rm mv etc. Those commands are working normally. 我已经厌倦了其他shell命令,例如:ls ll ln rm mv等。这些命令正常工作。 When I check my libc link, the result are as follows: 当我检查我的libc链接时,结果如下: 在此处输入图片说明

Additionally, I have tried to print my libz config using 另外,我尝试使用以下命令打印我的libz配置

ldconfig -v|grep libz

The result will be as follows: 结果将如下所示: 在此处输入图片说明

I was wondering why this may happen. 我想知道为什么会这样。 And I really need your guys help to solve this problem. 我真的需要你们的帮助来解决这个问题。

What's more, my 'gdb' will throw this error too. 而且,我的“ gdb”也会引发此错误。 When I use 'dmesg' command, I got the message as follows: 当我使用“ dmesg”命令时,收到如下消息: 在此处输入图片说明

CentOS 6 is based on glibc 2.12. CentOS 6是基于glibc 2.12的。 The symbolic link points to glibc 2.16, so you tried to install a glibc package which is not part of the operating system. 符号链接指向glibc 2.16,因此您尝试安装不属于操作系统的glibc软件包。 This has corrupted the system, likely beyond repair. 这损坏了系统,可能无法修复。 You will jave to reinstall it and restore the data from backup. 您将需要重新安装它并从备份中恢复数据。

Avoid reinstallation is a complex operation. 避免重新安装是一项复杂的操作。 You need to make sure that you still have all the files for glibc 2.12 (with names ending in -2.12.so ). 您需要确保仍然具有glibc 2.12的所有文件(名称以-2.12.so结尾)。 Then you can delete the glibc 2.16 files (those ending in -2.16.so ), with a single rm invocation . 然后,您可以通过一次rm调用删除glibc 2.16文件(以-2.16.so结尾的-2.16.so )。 (The single rm invocation is necessary because rm will stop working once you start deleting the glibc 2.16 files.) After that, you can run ldconfig to get back the right symbolic links. (单次rm调用是必需的,因为一旦开始删除glibc 2.16文件, rm就会停止工作。)之后,可以运行ldconfig来获取正确的符号链接。

You could also try to use sln or ln -sf to fix the symbolic links manually, but you will have to remove the glibc 2.16 files at one point. 您也可以尝试使用slnln -sf手动修复符号链接,但是您将不得不一次删除glibc 2.16文件。 Until you do the latter, every ldconfig invocation will bring back the glibc 2.16 symbolic links. 在执行后者之前,每次ldconfig调用都会带回glibc 2.16符号链接。 And ldconfig is run automatically during package installation, so this can happen quite easily by accident. ldconfig在软件包安装过程中自动运行,因此这很容易偶然发生。

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

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