烏班圖安裝redis問題


ot@DESKTOP-5382063:/usr/local/redis/redis-3.0.4# make\
>
cd src && make all
make[1]: Entering directory '/usr/local/redis/redis-3.0.4/src'
    CC adlist.o
In file included from adlist.c:34:0:
zmalloc.h:50:10: fatal error: jemalloc/jemalloc.h: No such file or directory
 #include <jemalloc/jemalloc.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:197: recipe for target 'adlist.o' failed
make[1]: *** [adlist.o] Error 1
make[1]: Leaving directory '/usr/local/redis/redis-3.0.4/src'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2

以上10錯誤是進入redis安裝目錄出現編譯失敗的情況,有可能出現上次編譯殘留,make distclean命令進行清理,make&&make install命令進行編譯安裝

ubandu

初次安裝redis會出現:安裝redis時 提示執行make命令時提示 CC adlist.o /bin/sh: cc: 未找到命令。是因為redis是c語言言寫的需要c的運行庫需要安裝。

執行:sudo apt-get build-dep gcc或者apt install gcc命令

 

安裝成功后測試命令make test出現如下錯誤:make[1]: Entering directory '/usr/local/redis/redis-3.0.4/src' You need tcl 8.5 or newer in order to run the Redis test Makefile:211: recipe for target 'test' failed make[1]: *** [test] Error 1 make[1]: Leaving directory '/usr/local/redis/redis-3.0.4/src' Makefile:6: recipe for target 'test' failed make: *** [test] Error 2

解決方案:wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz

sudo tar xzvf tcl8.6.1-src.tar.gz -C /usr/local/

cd /usr/local/tcl8.6.1/unix/

sudo ./configure

sudo make

sudo make install

 


免責聲明!

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



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