6

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?

  • 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
  • Are you sure you're not running out of memory? I've had a similar problem caused by mysqld daemon that were occupating all the available memory. Run top command and see how much free memory you have, maybe that's the cause of your problem. – cardy Nov 13 '12 at 20:20
5

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.

  • 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 '12 at 0:25
3

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
  • Both yum and rpm were giving my "bus error"s on Centos 7.3, this fixed 'em. – Matt Aug 8 '17 at 0:27
1

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
  • 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
0

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

0

At this point I'd try testing the memory.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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