歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux管理 >> Linux配置 >> 編譯redis2.6.12報錯解決方法

編譯redis2.6.12報錯解決方法

日期:2017/2/27 14:57:53   编辑:Linux配置
編譯redis 2.6 由於系統有點老,以至於編不過,報錯undefined reference to__sync_add_and_fetch_4′,google了下,發現好多人遇到我同樣的問題,

zmalloc.o: In function zmalloc_used_memory':
/home/xx/redis-2.6.2/src/zmalloc.c:223: undefined reference to__sync_add_and_fetch_4′
collect2: ld 返回 1
make[1]: *** [redis-server] 錯誤 1
make[1]: Leaving directory `/home/xx/redis-2.6.2/src’
make: *** [all] 錯誤 2

github上面一兄弟在src/Makefile開頭加 CFLAGS= -march=i686解決了,但是我試了。繼續google,發現google group裡有個兄弟編輯了下src/.make_settings裡的OPT,改為OPT=-O2 -march=i686。

make過了,但是接下來make test又過不了。報錯如下

You need ‘tclsh8.5′ in order to run the Redis test

查了下資料,說是要最新的tcl,那就給你裝個最新的 http://www.linuxfromscratch.org/blfs/view/cvs/general/tcl.html

安裝完後,就可以了
Copyright © Linux教程網 All Rights Reserved