Redis installation on centos 6.5

Tolgay Toklar asked:

I am trying to install Redis on centos 6.5 (x64) with following line:

yum install redis

But I am getting following screen:

[root@NodeJs ~]# yum install redis
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: nl.mirror.eurid.eu
 * epel: nl.mirror.eurid.eu
 * extras: mirror.denit.net
 * updates: nl.mirror.eurid.eu
Resolving Dependencies
--> Running transaction check
---> Package redis.x86_64 0:2.8.14-2.el7 will be installed
--> Processing Dependency: systemd for package: redis-2.8.14-2.el7.x86_64
--> Processing Dependency: systemd for package: redis-2.8.14-2.el7.x86_64
--> Processing Dependency: libjemalloc.so.1()(64bit) for package: redis-2.8.14-2.el7.x86_64
--> Running transaction check
---> Package jemalloc.x86_64 0:3.6.0-1.el7 will be installed
---> Package redis.x86_64 0:2.8.14-2.el7 will be installed
--> Processing Dependency: systemd for package: redis-2.8.14-2.el7.x86_64
--> Processing Dependency: systemd for package: redis-2.8.14-2.el7.x86_64
--> Finished Dependency Resolution
Error: Package: redis-2.8.14-2.el7.x86_64 (epel)
           Requires: systemd
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

How can I resolve this problem ?

My answer:


You installed the EPEL repository for EL7, but you are actually running EL6. Remove the epel-release package, i.e., sudo yum search epel && sudo yum remove epel-release and replace it with the correct package.

According to this documentation Redis could be installed on CentOS6 by issuing the following commands:

// --- Compiling ---
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install

// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-6.rpm

$ yum --enablerepo=remi,remi-test install redis 

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.