CentOS6.7_x64安装Redis2.8.21

[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# wget 'http://codeload.github.com/antirez/redis/tar.gz/2.8.21' -O redis-2.8.21.tar.gz
[root@localhost src]# tar zxvf redis-2.8.21.tar.gz
[root@localhost src]# cd redis-2.8.21
[root@localhost redis-2.8.21]# make

报错:make[3]: gcc: Command not found

解决办法:yum install -y gcc

 

报错:

zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:55:2: error: #error "Newer version of jemalloc required"

解决办法:yum install -y epel-release;yum install -y jemalloc-devel

 

报错:

cc: ../deps/hiredis/libhiredis.a: No such file or directory
cc: ../deps/lua/src/liblua.a: No such file or directory
cc: ../deps/jemalloc/lib/libjemalloc.a: No such file or directory
make[1]: *** [redis-server] Error 1
make[1]: Leaving directory `/usr/local/src/redis-2.8.21/src'
make: *** [all] Error 2

解决办法:

[root@localhost redis-2.8.21]# cd deps/

[root@localhost deps]# make hiredis lua jemalloc

[root@localhost deps]# cd ..
[root@localhost redis-2.8.21]# make
[root@localhost redis-2.8.21]# make PREFIX=/usr/local/redis install


Last modification:January 1st, 1970 at 08:00 am

Leave a Comment