Redis实战——安装问题汇总
Posted onlyct
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Redis实战——安装问题汇总相关的知识,希望对你有一定的参考价值。
问题:编译过程中出现报错
[[email protected] redis-4.0.9]$ make cd src && make all make[1]: Entering directory `/home/webapp/redis-4.0.9/src‘ CC Makefile.dep make[1]: Leaving directory `/home/webapp/redis-4.0.9/src‘ make[1]: Entering directory `/home/webapp/redis-4.0.9/src‘ rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-check-rdb redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html Makefile.dep dict-benchmark (cd ../deps && make distclean) make[2]: Entering directory `/home/webapp/redis-4.0.9/deps‘ (cd hiredis && make clean) > <a style="color:#3465A4" href="/dev/null">/dev/null</a> || true (cd linenoise && make clean) > <a style="color:#3465A4" href="/dev/null">/dev/null</a> || true (cd lua && make clean) > <a style="color:#3465A4" href="/dev/null">/dev/null</a> || true (cd jemalloc && [ -f Makefile ] && make distclean) > <a style="color:#3465A4" href="/dev/null">/dev/null</a> || true (rm -f .make-*) make[2]: Leaving directory `/home/webapp/redis-4.0.9/deps‘ (rm -f .make-*) echo STD=-std=c99 -pedantic -DREDIS_STATIC=‘‘ >> .make-settings echo WARN=-Wall -W -Wno-missing-field-initializers >> .make-settings echo OPT=-O2 >> .make-settings echo MALLOC=jemalloc >> .make-settings echo CFLAGS= >> .make-settings echo LDFLAGS= >> .make-settings echo REDIS_CFLAGS= >> .make-settings echo REDIS_LDFLAGS= >> .make-settings echo PREV_FINAL_CFLAGS=-std=c99 -pedantic -DREDIS_STATIC=‘‘ -Wall -W -Wno-missing-field-initializers -O2 -g -ggdb -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -DUSE_JEMALLOC -I../deps/jemalloc/include >> .make-settings echo PREV_FINAL_LDFLAGS= -g -ggdb -rdynamic >> .make-settings (cd ../deps && make hiredis linenoise lua jemalloc) make[2]: Entering directory `/home/webapp/redis-4.0.9/deps‘ (cd hiredis && make clean) > <a style="color:#3465A4" href="/dev/null">/dev/null</a> || true (cd linenoise && make clean) > <a style="color:#3465A4" href="/dev/null">/dev/null</a> || true (cd lua && make clean) > <a style="color:#3465A4" href="/dev/null">/dev/null</a> || true (cd jemalloc && [ -f Makefile ] && make distclean) > <a style="color:#3465A4" href="/dev/null">/dev/null</a> || true (rm -f .make-*) (echo "" > .make-ldflags) (echo "" > .make-cflags) MAKE hiredis cd hiredis && make static make[3]: Entering directory `/home/webapp/redis-4.0.9/deps/hiredis‘ gcc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c make[3]: gcc: Command not found make[3]: *** [net.o] Error 127 make[3]: Leaving directory `/home/webapp/redis-4.0.9/deps/hiredis‘ make[2]: *** [hiredis] Error 2 make[2]: Leaving directory `/home/webapp/redis-4.0.9/deps‘ make[1]: [persist-settings] Error 2 (ignored) CC adlist.o <a style="color:#3465A4" href="/bin/sh">/bin/sh</a>: cc: command not found make[1]: *** [adlist.o] Error 127 make[1]: Leaving directory `/home/webapp/redis-4.0.9/src‘ make: *** [all] Error 2
提示gcc命令未找到,这是因为redis没有安装gcc编译器没安装
这时候只要安装编译器即可
[[email protected] redis-3.2.8]# yum install -y gcc g++ gcc-c++ make
安装完成提示
nstalled:
gcc.x86_64 0:4.4.7-18.el6_9.2 gcc-c++.x86_64 0:4.4.7-18.el6_9.2
Dependency Installed:
cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-18.el6_9.2
libstdc++-devel.x86_64 0:4.4.7-18.el6_9.2 mpfr.x86_64 0:2.4.1-6.el6
ppl.x86_64 0:0.10.2-11.el6
Dependency Updated:
libgcc.x86_64 0:4.4.7-18.el6_9.2 libgomp.x86_64 0:4.4.7-18.el6_9.2
libstdc++.x86_64 0:4.4.7-18.el6_9.2
Complete!
以上是关于Redis实战——安装问题汇总的主要内容,如果未能解决你的问题,请参考以下文章
Redis五大数据类型与使用场景汇总!!(含完整实战案例,建议收藏)