MAKE hiredis
cd hiredis && make static
make[3]: Entering directory `/home/zzb/soft/redis-5.0.3/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] 错误 127
make[3]: Leaving directory `/home/zzb/soft/redis-5.0.3/deps/hiredis'
make[2]: *** [hiredis] 错误 2
make[2]: Leaving directory `/home/zzb/soft/redis-5.0.3/deps'
make[1]: [persist-settings] 错误 2 (忽略)
CC adlist.o
/bin/sh: cc: command not found
make[1]: *** [adlist.o] 错误 127
make[1]: Leaving directory `/home/zzb/soft/redis-5.0.3/src'
make: *** [all] 错误 2
[root@server4 redis-5.0.3]#
解决方案一: 因为gcc依赖很多,以下按顺序都执行一下:
yum install cpp
yum install binutils
yum install glibc
yum install glibc-kernheaders
yum install glibc-common
yum install glibc-devel
yum install gcc
yum install make
然后,删除redis解压文件,重新解压。在执行make。
Hint: It's a good idea to run 'make test' ;)
make[1]: Leaving directory `/home/zzb/soft/redis-4.0.11/src'
[root@server2 redis-4.0.11]#
[root@server2 src]# ll
......
-rw-rw-r-- 1 root root 2417 8月 4 2018 redisassert.h
-rwxr-xr-x 1 root root 5599902 4月 28 05:31 redis-benchmark
-rw-rw-r-- 1 root root 29605 8月 4 2018 redis-benchmark.c
-rw-r--r-- 1 root root 70320