redis安装 make时出现的问题


没有安装gcc

make[2]: Entering directory `/redis/redis-2.8.7/deps/hiredis'

cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
make[2]: cc: Command not found

解决办法:

yum install gcc-c++


沒安裝tcl

make[1]: Entering directory `/redis/redis-2.8.7/src'
which: no tclsh8.5 in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
You need 'tclsh8.5' in order to run the Redis test

解决方案:

官网教程

http://www.linuxfromscratch.org/blfs/view/cvs/general/tcl.html


沒安裝jemalloc内存分配器, 错误信息如:

make[1]: Entering directory `/root/soft/redis-2.8.7/src'
CC adlist.o
In file included from adlist.c:34:
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 `/root/soft/redis-2.8.7/src'
make: *** [all] Error 2


安装命令:

[root@bogon redis-2.8.21]# wget http://www.canonware.com/download/jemalloc/jemalloc-3.2.0.tar.bz2

[root@bogon redis-2.8.21]#   tar jxf jemalloc-3.2.0.tar.bz2 #(tar.bz2的压缩格式使用 tar jxf 解压)
[root@bogon redis-2.8.21]#  cd jemalloc-3.2.0
[root@bogon redis-2.8.21]# ./configure
[root@bogon redis-2.8.21]# make && make install
[root@bogon redis-2.8.21]# ldconfig


你可能感兴趣的:(redis)