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

错误信息:

In file included from adlist.c:34:0:

zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录

#include

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

解决方案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

^

编译中断。

make[1]: [adlist.o] 错误 1

make[1]: 离开目录“/root/lnmp_soft/redis-3.0.6/src”

make:[all] 错误 2

解决1命令如下

[root@WEB redis-3.0.6]# make MALLOC=libc

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 || true

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

不知道是啥end

解决方案2

42b72f20d3a8a18297aec1128bfe17ea.png

2.cd deps/

3.make hiredis jemalloc linenoise lua geohash-int

1b2fd4ec468402b8603b3e1cb17f54dd.png

4.重新编译

67851c9b2807c3e6ab638d4e79904eee.png

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

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值