安裝redis的時候需要make工具。ubuntu下沒有。需要參考以下安裝
$ sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
$ sudo apt-get update
Then, installing Ubuntu Make:
$ sudo apt-get install ubuntu-make
來源:
https://wiki.ubuntu.com/ubuntu-make
之後在redis目錄執行make
還是失敗了。因為沒有安裝cc,繼續安裝:
sudo apt-get install gcc
再次make。又failed了。
這次提示:
#include [jemalloc] jemalloc.h
recipe for adlist.o failed
執行以下操作:
Plz, Just try next step:
[root@localhost redis-2.6.10]# make distclean
[root@localhost redis-2.6.10]# cd deps; make; cd ..
[root@localhost redis-2.6.10]# cd src; make; cd ..
參考https://github.com/antirez/redis/issues/722
make install成功了。然後執行make test 又提示tcl沒安裝
sudo apt-get install tcl8.6-dev
sudo apt-get install tk8.6-dev
安裝成功後,再執行make test。一大串test OK的結果就打印出來了。