Centos5

CentOS 5.7 Yum Segmentation fault (core dumped) 錯誤

  • May 14, 2013

我的系統資訊:作業系統:CentOS release 5.7 (Final)

Apache 2.2.3 Server Running
DirectAdmin 1.40.1  Running
Exim 4.76           Running
MySQL 5.1.57        Running
Named 9.3.6         Running
ProFTPd 1.3.3c      Running
sshd                Running
dovecot 2.0.16      Running
Php 5.2.17          Installed

Total Memory        8052740 kB
Free Memory         3680156 kB
Total Swap Memory   25164468 kB
Free Swap Memory    25164468 kB

當我試圖通過做安裝 php-imap 時

yum install php-imap

我收到以下錯誤。

[root@www mailer]#  yum install php-imap
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirrors.supportex.net
* extras: mirrors.supportex.net
* rpmforge: mirror.nl.leaseweb.net
* updates: centos.mirror.transip.nl
base                                                     | 1.1 kB     00:00
base/primary                                             | 1.2 MB     00:00
Segmentation fault (core dumped)

我試著做

[root@www mailer]#  yum search php-imap

並得到這個錯誤。

[root@www mailer]#  yum search php-imap
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.supportex.net
* extras: mirrors.supportex.net
* rpmforge: mirror.nl.leaseweb.net
* updates: centos.mirror.transip.nl
Segmentation fault (core dumped)

我什至試過

[root@www mailer]# yum clean all
Loaded plugins: fastestmirror
Cleaning up Everything
Cleaning up list of fastest mirrors

並做了這個並得到了同樣的錯誤

[root@www mailer]# yum check-update
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirrors.supportex.net
* extras: mirrors.supportex.net
* rpmforge: mirror.nl.leaseweb.net
* updates: centos.mirror.triple-it.nl
base                                                     | 1.1 kB     00:00
base/primary                                             | 1.2 MB     00:00
Segmentation fault (core dumped)

然後我嘗試了

rm -rf /var/lib/rpm/__db.*
rpm --rebuilddb
yum clean all
yum makecache

得到了這個

[root@www mailer]# rm -rf /var/lib/rpm/__db.*
[root@www mailer]# rm -rf /var/lib/rpm/__db.*
[root@www mailer]# rpm --rebuilddb
[root@www mailer]# yum clean all
Loaded plugins: fastestmirror
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@www mailer]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirrors.supportex.net
* extras: mirrors.supportex.net
* rpmforge: mirror.nl.leaseweb.net
* updates: centos.mirror.triple-it.nl
base                                                     | 1.1 kB     00:00
base/filelists                                           | 3.6 MB     00:00
base/other                                               |  13 MB     00:01
base/group                                               | 1.1 MB     00:00
base/primary                                             | 1.2 MB     00:00
dag                                                      | 1.9 kB     00:00
dag/filelists_db                                         | 6.1 MB     00:04
dag/other_db                                             | 1.5 MB     00:01
dag/primary_db                                           | 7.0 MB     00:04
extras                                                   | 2.1 kB     00:00
extras/filelists_db                                      | 241 kB     00:00
extras/other_db                                          | 406 kB     00:00
extras/group                                             | 9.7 kB     00:00
extras/primary_db                                        | 188 kB     00:00
rpmforge                                                 | 1.9 kB     00:00
rpmforge/filelists_db                                    | 6.1 MB     00:00
rpmforge/other_db                                        | 1.5 MB     00:00
rpmforge/primary_db                                      | 7.0 MB     00:00
updates                                                  | 1.9 kB     00:00
updates/filelists_db                                     | 1.9 MB     00:00
updates/other_db                                         | 8.3 MB     00:00
updates/primary_db                                       | 383 kB     00:00
Segmentation fault (core dumped)

我該如何解決這個錯誤?謝謝你的時間。

更新:我試著做

strace -f yum make cache 

它給了我很長的輸出,這是最後幾行。

futex(0x2ba19218a500, FUTEX_WAKE_PRIVATE, 2147483647) = 0
stat("/var/cache/yum/base/primary.xml.gz", {st_mode=S_IFREG|0644, st_size=1303494, ...}) = 0
stat("/var/cache/yum/base/primary.xml.gz", {st_mode=S_IFREG|0644, st_size=1303494, ...}) = 0
stat("/var/cache/yum/base/primary.xml.gz", {st_mode=S_IFREG|0644, st_size=1303494, ...}) = 0
open("/var/cache/yum/base/primary.xml.gz", O_RDONLY) = 10
lseek(10, 0, SEEK_CUR)                  = 0
read(10, "\37\213\10\10\0\0\0\0\2\377/home/buildcentos/CENTOS/5.9/en/x86_64/.repodata/primary.xml\0\354\275Y\227\333F\2260\370\316_\201\243\207ii,0\21\10\254\32\227\347\310\222,g\227$g;\345\262\276\247<\1 \300\204\23$X\0\230\213\36\346\267\317\275\21\0\t0\261\4\310\314\224\252\272\272\313\266D\304vc\271\373\362\343\377{\273L\265k\236\27I\266\372\333327\236i|\25fQ\262Z\374\355\331\37\237\177\321\275g\377\357O\263\37\227\274d\21+\231\6\315W\305\337\236]\226\345\372\325\311I\232\2546\267\363hs\305\347<\332\234\324\255N\302l\271\314V\317d\353W\371z9\332\3\332<\323\326,\274b\v\16\343S\307\"\317`\336\352\27\255\274[\363\277=\303F?\375\270bK\376S\301\305H\372:K\223\360\356\307\23\361\343\217,\17/\177Ze\370\237\37O\304_~\254`\323\370:\v/\377\366\f\340\203_\376\366\314\234[s\347\231\226\363\24&\243\336\234\247\366\263\223\237~\f/yxUl\226\325\204\305%\203U]-\222\350o\317\376\317\273\363g?E!\261\35\213\307\226\37:!\245Q\354\370\314%\0063\31\267)\367Il\221(t\235\350\307\223z\244\237~\204\177-Y~\367\323\371\273\17\270dM.Y\v\263U\234,69+ay?\236\324\255~\214x\21\346\311\32\177\335v\371\235\307<\207s\341\332\231\354\254k\313,\332\244,\237\377x\322\354PoX\16\260l\362\364\247j\327\v\350\35\313y\347E\266\311C\36g\371\202\317W\274\374\361\4\333\375X&K\256\305I\n@\23j\273\256cZ\226\365L\v6I\32U?\231\236\341\212M*\222\257\274>\253"..., 8192) = 8192
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV (core dumped) +++

更新:

[root@www ~]# tail /var/log/messages

www kernel: yum[4089]: segfault at 0000003900000000 rip 00000039cfc79e0a rsp 00007fff280dcaf8 error 4

問題解決更新

正如 0x534B41 所建議的那樣

我從

/usr/lib
/usr/local/lib

並安裝

zlib 1.2.3

reference : 
http://www.doxer.org/learn-linux/resolved-yum-returned-segmentation-fault-error-on-centos/
http://serverfault.com/questions/256385/yum-segmentation-fault-in-centos

http://petio.org/tools/zlib.html
http://code.google.com/p/google-desktop-for-linux-mirror/downloads/detail?name=zlib-1.2.3.tar.gz&can=2&q=

謝謝你的時間。

問題解決更新

正如0x534B41所建議的那樣

我從

/usr/lib
/usr/local/lib

並安裝

zlib 1.2.3

參考 :

http://www.doxer.org/learn-linux/resolved-yum-returned-segmentation-fault-error-on-centos/
http://serverfault.com/questions/256385/yum-segmentation-fault-in-centos

http://petio.org/tools/zlib.html
http://code.google.com/p/google-desktop-for-linux-mirror/downloads/detail?name=zlib-1.2.3.tar.gz&can=2&q=

引用自:https://serverfault.com/questions/507195