redis安裝make過程中可能出現的問題


  1. CentOS5.7默認沒有安裝gcc,這會導致我們無法make成功。使用yum安裝:
    yum -y install gcc
  2. make時報如下錯誤:
    zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
    zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
    make[1]: *** [adlist.o] Error 1
    make[1]: Leaving directory `/data0/src/redis-2.6.2/src'
    make: *** [all] Error 2

    原因是jemalloc重載了Linux下的ANSI C的malloc和free函數。解決辦法:make時添加參數。

    make MALLOC=libc
  3. make之后,會出現一句提示
    Hint: To run 'make test' is a good idea ;) 

    但是不測試,通常是可以使用的。若我們運行make test ,會有如下提示

    [devnote@devnote src]$ make test
    You need tcl 8.5 or newer in order to run the Redis test
    make: ***[test] Error_1

    解決辦法是用yum安裝tcl8.5(或去tcl的官方網站http://www.tcl.tk/下載8.5版本,並參考官網介紹進行安裝)

    yum install tcl

 

轉:https://blog.csdn.net/lgh1117/article/details/48270085


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM