linux 上安装redis 解压以后使用make命令报错

错误信息:html

 In file included from adlist.c:34:0:
zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录
#include <jemalloc/jemalloc.h>redis

 

若出现【zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录】,则运行命令make MALLOC=libc)ide

 

解决方案1:
[root@WEB redis-3.0.6]# make
cd src && make all
make[1]: 进入目录“/root/lnmp_soft/redis-3.0.6/src”
CC adlist.o
In file included from adlist.c:34:0:
zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录
#include <jemalloc/jemalloc.h>
^
编译中断。
make[1]: [adlist.o] 错误 1
make[1]: 离开目录“/root/lnmp_soft/redis-3.0.6/src”
make: 
[all] 错误 2post

解决1命令以下
[root@WEB redis-3.0.6]# make MALLOC=libclua

cd src && make all
不知道是啥start:make[1]: 进入目录“/root/lnmp_soft/redis-3.0.6/src”
rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-dump redis-check-aof .o .gcda .gcno.gcov redis.info lcov-html
(cd ../deps && make distclean)
make[2]: 进入目录“/root/lnmp_soft/redis-3.0.6/deps”
(cd hiredis && make clean) > /dev/null || trueidea

MALLOC这个环境变量用来去创建Redis的spa

不知道是啥endserver

 

解决方案2htm

 

2.cd deps/blog

3.make hiredis jemalloc linenoise lua geohash-int

 

 4.从新编译

 

 

make 成功后 提示Hint: It's a good idea to run 'make test'
输入:make test
错误3:make[1]: Entering directory `/root/software/redis-3.0.0/src'
You need tcl 8.5 or newer in order to run the Redis test
缘由:没有安装tcl
解决方案:yum install -y tcl
而后
make test
而后仍是提示Hint: It's a good idea to run 'make test'

只好放大招了:make distclean; make

 

 

方案2有问题 make distclean(清理的不干净) 换如下解决方案

解决:make clean

make

make test

相关文章
相关标签/搜索