redis 3 make error warning: unused variable ‘c’ [-Wunused-variable]

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了redis 3 make error warning: unused variable ‘c’ [-Wunused-variable]相关的知识,希望对你有一定的参考价值。

cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldo.o ldo.c
ldo.c: In function ‘f_parser’:
ldo.c:496:7: warning: unused variable ‘c’ [-Wunused-variable]
int c = luaZ_lookahead(p->z);
^
cc -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL -DREDIS_STATIC='' -c -o ldump.o ldump.c
...
...
make[1]: *** No rule to make target `release.h', needed by `release.o'. Stop.
make[1]: Leaving directory `/root/redis-3.2.0/src'
make: *** [all] Error 2

参考技术A 好像权限不够。你进入到redis/scr下面,执行make install试试本回答被提问者和网友采纳

redis make jemalloc

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





以上是关于redis 3 make error warning: unused variable ‘c’ [-Wunused-variable]的主要内容,如果未能解决你的问题,请参考以下文章

redis make jemalloc

redis make时 提示 zmalloc.h:50:31: error: jemalloc/jemalloc.h:

Linux 安装redis和遇到异常解决

redis 单节点安装

CentOS 6.5 安装 Redis 执行 make #error "Newer version of jemalloc required"

redis 安装及相关问题解决