gpt4 book ai didi

compilation - CentOS 5.8上Redis安装报错

转载 作者:IT王子 更新时间:2023-10-29 06:10:18 26 4
gpt4 key购买 nike

我试图在 CentOS 5.8 上编译 Redis 2.6.4,但在运行 make 后出现以下错误

zmalloc.o: In function zmalloc_used_memory':
/root/redis-2.6.4/src/zmalloc.c:223: undefined reference to
__sync_add_and_fetch_4' collect2: ld returned 1 exit status make[1]: * [redis-server] Error 1 make[1]: Leaving directory `/root/redis-2.6.4/src' make: * [all] Error 2

我还在 src/Makefile 中尝试了 CFLAGS= -march=i686 但没有成功。实际上,我不知道该把它放在哪里。我放在文件的顶部。

最佳答案

1 添加 CFLAGS= -march=i686 到 src/Makefile 顶部

2 将 src/.make_settings OPT=-O2 更改为 OPT=-O2 -march=i686

3 然后 制作 32 位

4 进行测试

这对我有用。

附言。也许你会遇到 tcl 问题

1 rpm -qa | grep tcl 查看tcl版本是不是blow 8.5

2 如果是 yum remove tcl

3 转到 http://www.linuxfromscratch.org/blfs/view/cvs/general/tcl.html得到一个最新的并安装

4 进入redis目录make test

关于compilation - CentOS 5.8上Redis安装报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13472631/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com