Installing Redis on CentOS 6.6 , yum keeps using redis-2.8.14-2.el7.x86_64 (EL7) instead of EL6

Kay Int Veen asked:

Im trying to install redis on one of my servers.
but i keep getting

Error: Package: redis-2.8.14-2.el7.x86_64 (epel)
Requires: systemd

This is due to the fact that its trying to download the centos 7 version.

i already removed the wrong repo but he keeps using it.

This is my repolist

repo id                                      repo name                                                                           status
base                                         CentOS-6 - Base                                                                     6518
epel                                         Extra Packages for Enterprise Linux 6 - x86_64                                      7410
extras                                       CentOS-6 - Extras                                                                     37
updates                                      CentOS-6 - Updates                                                                   830

i use this now:

rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
yum install redis

My answer:

You replaced the wrong EPEL repo (for CentOS 7) with the correct repo (for CentOS 6) but the system still is trying to download EPEL packages for 7.

In this case yum still has cached metadata from the EPEL repo from the last run with the wrong repo.

To resolve the problem, clear the cached metadata.

yum clean metadata

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.