Redis安装在centos 6.5上

Modified on: Sat, 20 Jul 2019 11:40:02 +0800

我正在尝试使用以下行在centos 6.5(x64)上安装Redis:

yum install redis

但我正在关注屏幕:

[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

如何解决此问题?

最佳答案

您为EL7安装了EPEL存储库,但实际上您正在运行EL6。删除epel-release包,即sudo yum search epel && sudo yum remove epel-release并将其替换为正确的包。

根据此文档,可以通过发出以下命令在CentOS6上安装Redis:

// --- 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 
作者:,Michael Hampton

相关问答

添加新评论