Yum problem in CentOS 6.5

October 16, 2014 9.9k views

Hi, I started to have problems with yum. It does not return anything.

When I check /var/log/messages, I can find following error messages:

Oct 16 05:14:31 dev kernel: yum[28694]: segfault at 3000000000 ip 00000030130813c0 sp 00007fffc9047f98 error 4 in libc-2.12.so[3013000000+18a000]

where the "dev kernel: yum" and "error 4 in libc-2.12.so" are always present.

Any clues how to solve? I have tried to disable repos one by one. No luck there.
Running yum with -d does not give a clue.

I cannot find libc-2.12.so thought I don't know where is should exist.

1 Answer

Not sure if you updated prior to that and didn't reboot, but if that is the case, this is usually resolved by a reboot. If that doesn't fix it, try this:

updatedb; locate libc-2.12.so
  • Hi and thanks for reply,

    Reboot did not work, that was among first things I tried.

    For the command you provided, I just get "command not found". And as suggested in various sources the solution is to install mlocate package which of course I cannot do as yum is not working.

    My other server having same issue had updatedb command available so I now know where the file is located: /lib64/libc-2.12.so

    But what to do next?

  • run this:

    if [ -f "/lib64/libc-2.12.so" ]; then echo "/lib64/libc-2.12.so exists, and is a regular file"; else echo "/lib64/libc-2.12.so isn't found.  Doesn't appear to be installed";fi
    

    (A WARNING -- I've done my best to ensure this works, but you do this at your own risk. I'm not an employee of DO, so they are not liable. Furthermore, You agree not to hold me liable for any issues that arise from this!!!)

    If that returns "libc-2.12.so isn't found", do this:

    wget ftp://195.220.108.108/linux/centos/6.5/updates/x86_64/Packages/glibc-2.12-1.132.el6_5.4.x86_64.rpm
    rpm -Uvh glibc-2.12-1.132.el6_5.4.x86_64.rpm
    

    If it returns "libc-2.12.so exists, and is a regular file", try this:

    glibc_ver=`rpm -qa |grep glibc-2.12`
    
    case "$glibc_ver" in
        glibc-2.12.1-11.3.mga1.x86_64)
            url="ftp://195.220.108.108/linux/mageia/distrib/1/x86_64/media/core/updates/glibc-2.12.1-11.3.mga1.x86_64.rpm"
            ;;
        glibc-2.12.1-11.2.mga1.x86_64)
            url="ftp://195.220.108.108/linux/mageia/distrib/1/x86_64/media/core/updates/glibc-2.12.1-11.2.mga1.x86_64.rpm"
            ;;
        glibc-2.12.1-11.mga1.x86_64.rpm)
            url="ftp://195.220.108.108/linux/mageia/distrib/1/x86_64/media/core/release/glibc-2.12.1-11.mga1.x86_64.rpm"
            ;;
        glibc-2.12-1.149.el6.x86_64)
            url="ftp://195.220.108.108/linux/centos/6.6/os/x86_64/Packages/glibc-2.12-1.149.el6.x86_64.rpm"
            ;;
        glibc-2.12-1.132.el6_5.4.x86_64)
            url="ftp://195.220.108.108/linux/centos/6.5/updates/x86_64/Packages/glibc-2.12-1.132.el6_5.4.x86_64.rpm"
            ;;
        glibc-2.12-1.132.el6_5.3.x86_64)
            url="ftp://195.220.108.108/linux/centos/6.5/updates/x86_64/Packages/glibc-2.12-1.132.el6_5.3.x86_64.rpm"
            ;;
        glibc-2.12-1.132.el6_5.2.x86_64)
            url="ftp://195.220.108.108/linux/centos/6.5/updates/x86_64/Packages/glibc-2.12-1.132.el6_5.2.x86_64.rpm"
            ;;
        glibc-2.12-1.132.el6_5.1.x86_64)
            url="ftp://195.220.108.108/linux/centos/6.5/updates/x86_64/Packages/glibc-2.12-1.132.el6_5.1.x86_64.rpm"
            ;;
        glibc-2.12-1.132.el6.x86_64)
            url="ftp://195.220.108.108/linux/centos/6.5/os/x86_64/Packages/glibc-2.12-1.132.el6.x86_64.rpm"
            ;;
    esac
    if [ -z "$url" ]; then
        echo "Didn't find a supported glibc package. Stopping."
    else
        wget $url
        rpm -Uvh ${glibc_ver}.rpm
    fi
    

    This script will re-install your glibc version (if it's in a list of versions I could fine for CentOS 6.5)

Have another answer? Share your knowledge.