在ubuntu下安装redis-2.8.19,遇到以下问题
1、执行make命令的时候显示command not found需先安装make,执行以下命令:
sudo apt-get install make
2、安装make命令之后,执行 sudo make 显示如下:
[Email protected]:/usr/local/redis/redis-2.8.19&& make allmake[1]: Entering directory '/ Home/user/redis-2.4.2/src ' Makehiredismake[2]: Entering directory '/home/user/redis-2.4.2/deps/hiredis' -c-std=c99-pedantic-o3-fpic-wall-w-wstrict-prototypes-wwrite-strings -g-ggdb net. cmake[2]: cc: Command not foundmake[2]: * * [NET.O] Error 127make[2]: Leaving directory '/home/use R/redis-2.4.2/deps/hiredis 'make[1]: * * [dependencies] Error 2make[1]: Leaving directory '/home/user/redis-2.4.2/ src'Make: * * * [ALL] Error 2
Workaround:
sudo apt-get install gccsudo apt-get install build-essentialsudo apt-get update
After doing this, execute sudo make
If the following error is reported
If there is another the error like "fatal error:jemalloc/jemalloc.h:no such file or directory"
Then execute the following command
sudo make Distclean
sudo make
The above is the problem encountered during the installation process, and search for a workable solution, recorded for future needs
Redis installation encounters problems and workarounds record