安装redis-执行make命令报错解决方法

来源:互联网 发布:ubuntu 16.04 vi使用 编辑:程序博客网 时间:2024/05/17 19:17

问题原因:未安装GCC

cd hiredis && make staticmake[3]: 进入目录“/opt/redis-3.0.4/deps/hiredis”gcc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb  net.cmake[3]: gcc:命令未找到make[3]: *** [net.o] 错误 127make[3]: 离开目录“/opt/redis-3.0.4/deps/hiredis”make[2]: *** [hiredis] 错误 2make[2]: 离开目录“/opt/redis-3.0.4/deps”make[1]: [persist-settings] 错误 2 (忽略)    CC adlist.o/bin/sh: cc: 未找到命令make[1]: *** [adlist.o] 错误 127make[1]: 离开目录“/opt/redis-3.0.4/src”make: *** [all] 错误 2

解决方案:

linux环境有网的情况下执行命令:
如果没网看这篇linux连接不上网络

yum install gcc-c++
3 1