本文共 3719 字,大约阅读时间需要 12 分钟。
redis 编译安装过程中出现问题汇总:
通过解压方式安装,tar -zvxf redis-3.2.9.tar.gz进入 解压后的文件目录,如下cd /home/redis-3.2.9/进行编译安装,在编译安装过程中出现如下错误:[root@localhost redis-3.2.9]# makecd src && make allmake[1]: 进入目录“/home/redis-3.2.9/src”CC adlist.oIn file included from adlist.c:34:0:zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录#include <jemalloc/jemalloc.h>^编译中断。make[1]: [adlist.o] 错误 1make[1]: 离开目录“/home/redis-3.2.9/src”make: [all] 错误 2这时使用make MALLOC=libc,进行安装:
root@localhost src]#make MALLOC=libcrm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-rdb redis-check-aof .o .gcda .gcno .gcov redis.info lcov-html(cd ../deps && make distclean)make[1]: 进入目录“/home/redis-3.2.9/deps”(cd hiredis && make clean) > /dev/null || true(cd linenoise && make clean) > /dev/null || true(cd lua && make clean) > /dev/null || true(cd geohash-int && make clean) > /dev/null || true(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true(rm -f .make-)make[1]: 离开目录“/home/redis-3.2.9/deps”(rm -f .make-)echo STD=-std=c99 -pedantic -DREDIS_STATIC= >> .make-settingsecho WARN=-Wall -W >> .make-settingsecho OPT=-O2 >> .make-settingsecho MALLOC=libc >> .make-settingsecho CFLAGS= >> .make-settingsecho LDFLAGS= >> .make-settingsecho REDIS_CFLAGS= >> .make-settingsecho REDIS_LDFLAGS= >> .make-settingsecho PREV_FINAL_CFLAGS=-std=c99 -pedantic -DREDIS_STATIC= -Wall -W -O2 -g -ggdb -I../deps/geohash-int -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src >> .make-settingsecho PREV_FINAL_LDFLAGS= -g -ggdb -rdynamic >> .make-settings(cd ../deps && make hiredis linenoise lua geohash-int)make[1]: 进入目录“/home/redis-3.2.9/deps”(cd hiredis && make clean) > /dev/null || true(cd linenoise && make clean) > /dev/null || true(cd lua && make clean) > /dev/null || true(cd geohash-int && make clean) > /dev/null || true(cd jemalloc && [ -f Makefile ] && make distclean) > /dev/null || true(rm -f .make-*)(echo "" > .make-cflags)(echo "" > .make-ldflags)MAKE hirediscd hiredis && make staticmake[2]: 进入目录“/home/redis-3.2.9/deps/hiredis”cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.ccc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.ccc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.ccc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.car rcs libhiredis.a net.o hiredis.o sds.o async.omake[2]: 离开目录“/home/redis-3.2.9/deps/hiredis”....CC redis-benchmark.oLINK redis-benchmarkINSTALL redis-check-rdbCC redis-check-aof.oLINK redis-check-aofHint: It's a good idea to run 'make test' ;)
安装好后,进入src目录下,make test,报You need tcl 8.5 or newer in order to run the Redis test,然后安装tcl,如果可以在线安装就在线安装,如果不行同样下载对应需要安装版本tcl 8.5 tar包进行安装。
root@localhost redis-3.2.9]# make testcd src && make testmake[1]: 进入目录“/home/redis-3.2.9/src”You need tcl 8.5 or newer in order to run the Redis testmake[1]: [test] 错误 1make[1]: 离开目录“/home/redis-3.2.9/src”make: [test] 错误 2[root@localhost redis-3.2.9]# yum install tcl
已加载插件:fastestmirror, langpacksLoading mirror speeds from cached hostfile完毕!
[root@localhost redis-3.2.9]# make testcd src && make testmake[1]: 进入目录“/home/redis-3.2.9/src”Cleanup: may take some time... OKStarting test server at port 11111Testing unit/printver
....106 seconds - integration/replication-psync\o/ All tests passed without errors!
Cleanup: may take some time... OK
make[1]: 离开目录“/home/redis-3.2.9/src”转载于:https://blog.51cto.com/372550/2403826