Redis安装踩坑
程序员文章站
2022-05-27 14:41:54
...
本章记录:Redis6.0.6安装于Ubuntu中遇到的坑
注:使用前记得apt-get update一下
报错1:
[email protected]:/usr/local/redis$ sudo make
sudo: make: command not found
解决方案:
sudo apt-get install make
报错2:
make[3]: cc: Command not found
make[3]: *** [Makefile:201: net.o] Error 127
make[3]: Leaving directory '/usr/local/redis/deps/hiredis'
make[2]: *** [Makefile:50: hiredis] Error 2
make[2]: Leaving directory '/usr/local/redis/deps'
make[1]: [Makefile:264: persist-settings] Error 2 (ignored)
CC adlist.o
/bin/sh: 1: cc: not found
make[1]: *** [Makefile:315: adlist.o] Error 127
make[1]: Leaving directory '/usr/local/redis/src'
make: *** [Makefile:6: all] Error 2
解决方案:
sudo apt-get install gcc
报错3:
cc: error: ../deps/hiredis/libhiredis.a: No such file or directory
cc: error: ../deps/lua/src/liblua.a: No such file or directory
make[1]: *** [Makefile:283: redis-server] Error 1
make[1]: Leaving directory '/usr/local/redis/src'
make: *** [Makefile:6: all] Error 2
解决方案:
cd deps/
make lua hiredis linenoise
cd ..
sudo make
报错4:
You need tcl 8.5 or newer in order to run the Redis test
解决方案:
tar zxvf tcl8.6.1-src.tar.gz
cd tcl8.6.1/unix/
./configure
make
sudo make install