# 安装gcc依赖 yum install -y gcc gcc-c++ wget http://download.redis.io/releases/redis-4.0.14.tar.gz tar -zxvf redis-4.0.14.tar.gz -C /opt/ cd /opt/redis-4.0.14/ make PREFIX=/usr/local/redis install //指定安装的路径,
可能报错一
zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory zmalloc.h:55:2: error: #error “Newer version of jemalloc required” make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory `/data0/src/redis-2.6.2/src’ make: *** [all] Error 2
可以改成
make MALLOC=libc PREFIX=/usr/local/redis install ll /usr/local/redis/bin
可以报错二
1 2 3 4 5
cc: error: ../deps/hiredis/libhiredis.a: No such file or directory cc: error: ../deps/lua/src/liblua.a: No such file or directory make[1]: *** [redis-server] Error 1 make[1]: Leaving directory `/usr/local/src/redis-4.0.1/src' make: *** [all] Error 2