While using yum commands in a centos server(2.6.18-194.el5PAE #1), it throws 'Segmentation fault'.

[root@server2 ~]# yum check-update

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile

Segmentation fault

[root@server2 ~]# yum installlve-devel cmake

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Segmentation fault

[root@server2 ~]# yum update

Loaded plugins: fastestmirror Loading

mirror speeds from cached hostfile

Segmentation fault

How can I solve this?

link|improve this question

20% accept rate
1  
Here is the result: > [root@server2 ~]# yum clean all > Loadedplugins: fastestmirror Cleaning up > Everything Cleaning up list of fastest > mirrors > > [root@server52 ~]# yum -v check-update > Loading "fastestmirror" plugin Config > time: 0.036 Yum Version: 3.2.22 > Setting up Package Sacks Determining > fastest mirrors cloudlinux-base > cloudlinux-base/primary > Segmentation fault – Ajo Augustine Apr 6 '11 at 14:52
That looks like an issue with your repo files or with the data being returned when you connect to one of them. It might be the cloudlinux-base repo, or it might be the next one. To troubleshoot, I'd disable all but one repo, and see if you can get it to work. Try "yum check-updates --disablerepo=cloudlinux-base" and also see rajaseelan.com/2009/07/24/temporarily-disable-a-yum-repository for more information – malcolmpdx Apr 6 '11 at 14:59
feedback

5 Answers

The first thing I do when yum starts behaving strangely is

# yum clean all

It's hard to say from the info you've given here, but it seems a good guess that your cache and mirror files are corrupt. The above command will help fix that. If it doesn't work, then post the output of

# yum -v check-update
link|improve this answer
Now, try running "yum check-update" again, and see if it still segfaults. – malcolmpdx Apr 6 '11 at 14:45
Still the same result ... – Ajo Augustine Apr 6 '11 at 15:21
see my other comment. It's likely an issue with your repo or with the data returned by one of them. – malcolmpdx Apr 6 '11 at 15:23
feedback

The issue was with zlib upgrade from source which is a problem affect all RHEL/CentOS/CL installations:

http://bugs.centos.org/view.php?id=4702&nbn=1

I have removed source zlib

/usr/local/lib/libz.so.1.2.5

and Changed the links

/usr/local/lib/libz.so -> libz.so.1.2.5 lrwxrwxrwx 1 root root
13 Sep 24 2010 /usr/local/lib/libz.so.1 -> libz.so.1.2.5

to point to libz.so.1.2.3. This has fixed the issue.

link|improve this answer
This saved me a lot of heart-ache. Building zlib 1.2.6 on Fedora 12 64-bit causes yum to segfault, fix is to just not do this. – Asim Ihsan Mar 19 at 0:25
feedback

You can try repairing your rpm db and re-doing the cache

rm -rf /var/lib/rpm/__db.*
rpm --rebuilddb
yum clean all
yum makecache
link|improve this answer
feedback

If you're still seeing problems, replace the yum binary from a copy from another machine.

link|improve this answer
yum is a set of Python scripts. – Ignacio Vazquez-Abrams Apr 6 '11 at 14:42
feedback

At this point I'd try testing the memory.

Run memtest, best to leave it running for the night.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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