Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This question already has an answer here:

My system Info: OS :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

While i was trying to install php-imap by doing

 yum install php-imap

i got following error.

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

i tried doing

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

and got this error.

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

i even tried

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

and did this and got same error

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

then i tried

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

and got this

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

how can i fix this error ? Thanks for your time.

update: i tried doing

strace -f yum make cache 

and it gave me very long output, here are last few lines.

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

update:

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

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

Issue Solved UPDATE

as suggested by 0x534B41

i removed all zlib from

/usr/lib
/usr/local/lib

and installed

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=

Thanks for your time.

share|improve this question

marked as duplicate by Michael Hampton, Jenny D, gWaldo, Scott Pack, TheCleaner May 14 '13 at 13:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Did you have filesystem corruption recently? Running strace -f yum make cache may help you to understand where the problem lies. –  skara May 13 '13 at 5:49
    
no, never had filesystem corruption, just tried the command strace -f yum make cache and it gave very long output. –  AMB May 13 '13 at 5:55
    
This looks like the zlib compatibility issue. Did you install zlib from sources or maybe from a binary package not provided by centos? Take a look at doxer.org/learn-linux/… and serverfault.com/questions/256385/… . –  skara May 13 '13 at 19:44
    
i tried those methods and still dont work, i have updated question with issues. –  AMB May 14 '13 at 2:36
    
thanks 0x534B41 , issue was in zlib only, fixed issue. and now yum runs perfectly. –  AMB May 14 '13 at 3:01

1 Answer 1

up vote 1 down vote accepted

Issue Solved UPDATE

as suggested by 0x534B41

i removed all zlib from

/usr/lib
/usr/local/lib

and installed

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=
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.