首页 / REDIS / redis 编译安装问题记录
redis 编译安装问题记录
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了redis 编译安装问题记录,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3839字,纯文字阅读大概需要6分钟。
内容图文
![redis 编译安装问题记录](/upload/InfoBanner/zyjiaocheng/910/973aae13d4154bf7accd0298bdadc503.jpg)
redis 编译安装过程中出现问题汇总:
通过解压方式安装,tar -zvxf redis-3.2.9.tar.gz
进入 解压后的文件目录,如下
cd /home/redis-3.2.9/
进行编译安装,在编译安装过程中出现如下错误:
[root@localhost redis-3.2.9]# make
cd src && make all
make[1]: 进入目录“/home/redis-3.2.9/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]: 离开目录“/home/redis-3.2.9/src”
make: [all] 错误 2
这时使用make MALLOC=libc,进行安装:
root@localhost src]#make MALLOC=libc
rm -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-settings
echo WARN=-Wall -W >> .make-settings
echo OPT=-O2 >> .make-settings
echo MALLOC=libc >> .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 -O2 -g -ggdb -I../deps/geohash-int -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src >> .make-settings
echo 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 hiredis
cd hiredis && make static
make[2]: 进入目录“/home/redis-3.2.9/deps/hiredis”
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
make[2]: 离开目录“/home/redis-3.2.9/deps/hiredis”
.
.
.
.
CC redis-benchmark.o
LINK redis-benchmark
INSTALL redis-check-rdb
CC redis-check-aof.o
LINK redis-check-aof
Hint: 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 test
cd src && make test
make[1]: 进入目录“/home/redis-3.2.9/src”
You need tcl 8.5 or newer in order to run the Redis test
make[1]: [test] 错误 1
make[1]: 离开目录“/home/redis-3.2.9/src”
make: [test] 错误 2
[root@localhost redis-3.2.9]# yum install tcl
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
- base: mirrors.cn99.com
- epel: mirrors.aliyun.com
- extras: mirrors.njupt.edu.cn
- updates: mirrors.cn99.com
正在解决依赖关系
--> 正在检查事务
完毕!
[root@localhost redis-3.2.9]# make test
cd src && make test
make[1]: 进入目录“/home/redis-3.2.9/src”
Cleanup: may take some time... OK
Starting test server at port 11111
Testing 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”
内容总结
以上是互联网集市为您收集整理的redis 编译安装问题记录全部内容,希望文章能够帮你解决redis 编译安装问题记录所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。