在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$ sudo make cd src && make all make[1]: Entering directory `/home/user/redis-2.4.2/src‘ MAKE hiredis make[2]: Entering directory `/home/user/redis-2.4.2/deps/hiredis‘ cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c make[2]: cc: Command not found make[2]: *** [net.o] Error 127 make[2]: Leaving directory `/home/user/redis-2.4.2/deps/hiredis‘ make[1]: *** [dependencies] Error 2 make[1]: Leaving directory `/home/user/redis-2.4.2/src‘ make: *** [all] Error 2
解决办法:
sudo apt-get install gcc sudo apt-get install build-essential sudo apt-get update
完成上述操作之后,执行 sudo make
如果报以下错误
if there is another error like "fatal error: jemalloc/jemalloc.h: No such file or directory"
则执行以下命令
sudo make distclean sudo make
以上是在安装过程中遇到的问题,及搜索到奏效的解决办法,记录以备日后之需
时间: 2024-11-09 09:53:51