In a moment of confusion and impatience, I severely damaged my OS. Here's the deal...

System: CentOS 7

Problem: essential packages like SAMBA do not work, and yum will not do anything.

How it started: I installed kmod-xpad, which required a kernel update. This new kernel never worked, but I could boot from the old kernel on the boot loader. I did a routine package update via yum. Later on, I tried to remove kmod-xpad, but that failed. Now the system permanently tells me that I need to restart in order to install updates. Even worse, I cannot mount a network drive via Samba. I get an error message like...

/sbin/mount.cifs: /usr/lib64/samba/libreplace.so: version SAMBA_4.1.1' not found (required by /lib64/libwbclient.so.0)
/sbin/mount.cifs: /usr/lib64/samba/libwinbind-client.so: version `SAMBA_4.1.1' not found (required by /lib64/libwbclient.so.0)

While trying to fix SAMBA, I found that yum is completely confused, and had unfinished transactions. I searched around for solutions without luck (e.g. such as Why does "yum update" fails with many duplicates, after many months of no upgrades?)

Yum error messages: When I run yum clean all and yum update I run into an error with dependency resolution, and am then told that there are 374 pre-existing rpmdb problems, which are basically a bunch of duplicate packages. Here is a snippet:

--> Finished Dependency Resolution
Error: Package: avahi-libs-0.6.31-13.el7.x86_64 (@anaconda)
           Requires: avahi = 0.6.31-13.el7
           Removing: avahi-0.6.31-13.el7.x86_64 (@anaconda)
               avahi = 0.6.31-13.el7
           Updated By: avahi-0.6.31-14.el7.x86_64 (base)
               avahi = 0.6.31-14.el7
Error: avahi-libs conflicts with avahi-0.6.31-14.el7.x86_64
Error: avahi-autoipd conflicts with avahi-0.6.31-14.el7.x86_64

You could try using --skip-broken to work around the problem
 ** Found 374 pre-existing rpmdb problem(s), 'yum check' output follows:
 1:NetworkManager-1.0.0-14.git20150121.b4ea599c.el7.x86_64 is a duplicate with 1:NetworkManager-

avahi-libs-0.6.31-14.el7.x86_64 is a duplicate with avahi-libs-0.6.31-13.el7.x86_64
avahi-ui-gtk3-0.6.31-14.el7.x86_64 has installed conflicts avahi < ('0', '0.6.31', '14.el7'): avahi-0.6.31-13.el7.x86_64
avahi-ui-gtk3-0.6.31-14.el7.x86_64 is a duplicate with avahi-ui-gtk3-0.6.31-13.el7.x86_64
bash-4.2.46-12.el7.x86_64 is a duplicate with bash-4.2.45-5.el7_0.4.x86_64

yum log And here are the main events from my yum.log:

Apr 24 11:34:08 Updated: linux-firmware-20140911-0.1.git365e80c.el7.noarch
Apr 24 11:34:13 Installed: kernel-3.10.0-229.1.2.el7.x86_64
Apr 24 11:34:14 Installed: kmod-xpad-0.0.6-3.el7.elrepo.x86_64
May 08 13:38:28 Updated: libgcc-4.8.3-9.el7.x86_64
May 08 13:38:28 Updated: centos-release-7-1.1503.el7.centos.2.8.x86_64
May 08 13:38:28 Updated: python-urlgrabber-3.10-6.el7.noarch
May 08 13:38:28 Updated: 1:control-center-filesystem-3.8.6-18.el7.x86_64
May 08 13:38:28 Updated: hyperv-daemons-license-0-0.25.20141008git.el7.noarch

... (a bunch of packages)...

May 08 13:40:31 Updated: xorg-x11-server-common-1.15.0-33.el7_1.x86_64
May 08 13:40:31 Updated: xorg-x11-server-Xorg-1.15.0-33.el7_1.x86_64
May 08 14:02:03 Erased: kmod-xpad-0.0.6-3.el7.elrepo.x86_64

Is this a good solution? Right now, I'm considering removing the duplicates by following the advice on the CentOS forum:

rpm -e --justdb <package-version>

This sounds tedious, and I'm not confident that it will really resolve my problem. Is this a situation that calls for reinstallation?

Any advice will be appreciated.

1 Answer 1


I have come to a partial solution: yum update --skip-broken was able to restore the basic functions like mount. However, yum still has the problems with dependency resolution and duplicates. I'm not sure why "--skip-broken" worked this time; I had tried it once before with a similar yum command, and it had not accomplished anything.

  • 1
    You asked: Is this a good solution? referring to what exactly? rpm -e --justdb should basically never be used, that's the easiest way to completely mess your RPM database, and it will not solve your problem, as the files contained in those rpm packages that you only remove from the database will stay where they are.
    – doktor5000
    May 15, 2015 at 7:52
  • 5
    Proposed approach: First install yum-utils if not installed yet, and run package-cleanup --dupes which will only list duplicates, but will not remove anything. Then run yum-complete-transaction to try to complete any pending yum transactions. Then run yum repolist --enablerepo="*"; yum check and post the output in some pastebin service and post that link here. Be sure to not automatically uninstall all those duplicates if you don't want to make it worse. See e.g. stackoverflow.com/questions/19418301/… for more information.
    – doktor5000
    May 15, 2015 at 8:05
  • Thanks for the tips. I'll let you know if they work (and update my answer if they do). The question "is this a good solution?" was meant as a section header... sorry for the ambiguity.
    – adam.r
    May 17, 2015 at 1:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .