Dependency conflict when updating Yum in CentOS 7

user397403 asked:

On a newly installed CentOS 7 operatind system i am having this error while trying to run yum update

 Processing Conflict: kernel-3.10.0-514.6.1.el7.x86_64 conflicts kmod < 20-9
  --> Finished Dependency Resolution
 Error: Package: firefox-45.6.0-1.el7.centos.x86_64 (updates)
       Requires: nspr >= 4.11.0
       Installed: nspr-4.10.8-2.el7_1.x86_64 (@anaconda)
           nspr = 4.10.8-2.el7_1
 Error: Package: nss-3.21.3-2.el7_3.x86_64 (updates)
       Requires: nss-softokn(x86-64) >= 3.16.2.3-14.2
       Installed: nss-softokn-3.16.2.3-13.el7_1.x86_64 (@anaconda)
           nss-softokn(x86-64) = 3.16.2.3-13.el7_1
  Error: Package: 1:libguestfs-1.32.7-3.el7.centos.2.x86_64 (updates)
       Requires: supermin5 >= 5.1.16-2
       Installed: supermin5-5.1.10-1.2.el7.x86_64 (@anaconda)
           supermin5 = 5.1.10-1.2.el7
  Error: Package: libsemanage-2.5-5.1.el7_3.x86_64 (updates)
       Requires: libsepol.so.1(LIBSEPOL_1.0)(64bit)
  Error: Package: libsemanage-2.5-5.1.el7_3.x86_64 (updates)
       Requires: libsepol.so.1(LIBSEPOL_1.1)(64bit)
  Error: Package: 1:NetworkManager-1.4.0-14.el7_3.x86_64 (updates)
       Requires: glib2 >= 2.46.2
       Installed: glib2-2.42.2-5.el7.x86_64 (@anaconda)
           glib2 = 2.42.2-5.el7
  Error: Package: policycoreutils-2.5-11.el7_3.x86_64 (updates)
       Requires: libsepol.so.1(LIBSEPOL_1.0)(64bit)
  Error: kernel conflicts with kmod-20-5.el7.x86_64
  Error: Package: spice-glib-0.31-6.el7_3.2.x86_64 (updates)
       Requires: spice-protocol >= 0.12.11-1
       Available: spice-protocol-0.12.6-2.el7.noarch (base)
           spice-protocol = 0.12.6-2.el7
  Error: Package: 1:java-1.7.0-openjdk-headless-1.7.0.121-2.6.8.0.el7_3.x86_64 (updates)
       Requires: copy-jdk-configs >= 1.1-3
  Error: Package: 1:java-1.8.0-openjdk-headless-1.8.0.111-2.b15.el7_3.x86_64 (updates)
       Requires: copy-jdk-configs >= 1.1-3
  Error: Package: policycoreutils-python-2.5-11.el7_3.x86_64 (updates)
       Requires: libsepol.so.1(LIBSEPOL_1.0)(64bit)
  Error: Package: 7:lvm2-2.02.166-1.el7_3.2.x86_64 (updates)
       Requires: device-mapper-persistent-data >= 0.6.3-1
       Installed: device-mapper-persistent-data-0.5.5-1.el7.x86_64 (@anaconda)
           device-mapper-persistent-data = 0.5.5-1.el7
  Error: Package: kernel-3.10.0-514.6.1.el7.x86_64 (updates)
       Requires: linux-firmware >= 20160830-49
       Installed: linux-firmware-20150904-43.git6ebf5d5.el7.noarch (@anaconda)
           linux-firmware = 20150904-43.git6ebf5d5.el7
  Error: Package: nss-util-3.21.3-1.1.el7_3.x86_64 (updates)
       Requires: nspr >= 4.11.0-1
       Installed: nspr-4.10.8-2.el7_1.x86_64 (@anaconda)
           nspr = 4.10.8-2.el7_1
  Error: Package: policycoreutils-python-2.5-11.el7_3.x86_64 (updates)
       Requires: setools-libs >= 3.3.8-1
       Installed: setools-libs-3.3.7-46.el7.x86_64 (@anaconda)
           setools-libs = 3.3.7-46.el7
  Error: Package: policycoreutils-2.5-11.el7_3.x86_64 (updates)
       Requires: libsepol.so.1(LIBSEPOL_1.1)(64bit)
  Error: Package: policycoreutils-2.5-11.el7_3.x86_64 (updates)
       Requires: libselinux-utils >= 2.5-6
       Installed: libselinux-utils-2.2.2-6.el7.x86_64 (@anaconda)
           libselinux-utils = 2.2.2-6.el7
  Error: Package: spice-glib-0.31-6.el7_3.2.x86_64 (updates)
       Requires: usbredir >= 0.6-8
       Installed: usbredir-0.6-7.el7.x86_64 (@anaconda)
           usbredir = 0.6-7.el7
  Error: Package: policycoreutils-2.5-11.el7_3.x86_64 (updates)
       Requires: libsepol >= 2.5-6
       Installed: libsepol-2.1.9-3.el7.x86_64 (@anaconda)
           libsepol = 2.1.9-3.el7
  Error: Package: 1:java-1.7.0-openjdk-headless-1.7.0.121-2.6.8.0.el7_3.x86_64 (updates)
       Requires: chkconfig >= 1.7
       Installed: chkconfig-1.3.61-5.el7.x86_64 (@anaconda)
           chkconfig = 1.3.61-5.el7
  Error: Package: samba-libs-4.4.4-12.el7_3.x86_64 (updates)
       Requires: libpytalloc-util.so.2(PYTALLOC_UTIL_2.1.6)(64bit)
  Error: Package: 10:qemu-kvm-1.5.3-126.el7_3.3.x86_64 (updates)
       Requires: libusbx >= 1.0.19
       Installed: libusbx-1.0.15-4.el7.x86_64 (@anaconda)
           libusbx = 1.0.15-4.el7
  Error: Package: nss-3.21.3-2.el7_3.x86_64 (updates)
       Requires: nspr >= 4.11.0
       Installed: nspr-4.10.8-2.el7_1.x86_64 (@anaconda)
           nspr = 4.10.8-2.el7_1
  Error: Package: 1:java-1.8.0-openjdk-headless-1.8.0.111-2.b15.el7_3.x86_64 (updates)
       Requires: chkconfig >= 1.7
       Installed: chkconfig-1.3.61-5.el7.x86_64 (@anaconda)
           chkconfig = 1.3.61-5.el7

For the world i can not figure out how to replace the reference from anaconda to updates and how to resolve the following conflicts.

Most importantly i can not understand why did it happen, because during the previous intallations using exactly the same image i never had the same problem.

My answer:


Your yum repositories are out of sync with each other.

Your base repository is showing files from CentOS 7.1 or 7.2 (I can’t be sure which) but your updates repository is showing files from CentOS 7.3.

It might be that you simply have out-of-date metadata on your system, in which case you can fix that by running yum clean all and then trying to update again.

But it is much more likely that someone has messed with the base repo, so as to attempt to force it to remain on 7.1 or 7.2. This is not supported, and you should edit the repo file /etc/yum.repos.d/CentOS-Base.repo to restore it to its original form.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.