Redis 编译报错 "make[3]: gcc:命令未找到" 解决实例

make[3]: gcc:命令未找到

很明显是缺少依赖!

解决方案:用root用户登录,然后执行以下命令  yum -y install gcc automake autoconf libtool make 

成功的话应该看到以下进程。

[root@local cdrom]# yum -y install gcc automake autoconf libtool make 
已加载插件:fastestmirror
设置安装进程
Loading mirror speeds from cached hostfile
Centos-source-local                                                                                | 4.0 kB     00:00 ... 
包 1:make-3.81-20.el6.x86_64 已安装并且是最新版本
解决依赖关系
--> 执行事务检查
---> Package autoconf.noarch 0:2.63-5.1.el6 will be 安装
---> Package automake.noarch 0:1.11.1-4.el6 will be 安装
---> Package gcc.x86_64 0:4.4.7-16.el6 will be 安装
--> 处理依赖关系 libgomp = 4.4.7-16.el6,它被软件包 gcc-4.4.7-16.el6.x86_64 需要
--> 处理依赖关系 cpp = 4.4.7-16.el6,它被软件包 gcc-4.4.7-16.el6.x86_64 需要
--> 处理依赖关系 cloog-ppl >= 0.15,它被软件包 gcc-4.4.7-16.el6.x86_64 需要
--> 处理依赖关系 libgomp.so.1()(64bit),它被软件包 gcc-4.4.7-16.el6.x86_64 需要
---> Package libtool.x86_64 0:2.2.6-15.5.el6 will be 安装
--> 执行事务检查
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be 安装
--> 处理依赖关系 libppl_c.so.2()(64bit),它被软件包 cloog-ppl-0.15.7-1.2.el6.x86_64 需要
--> 处理依赖关系 libppl.so.7()(64bit),它被软件包 cloog-ppl-0.15.7-1.2.el6.x86_64 需要
---> Package cpp.x86_64 0:4.4.7-16.el6 will be 安装
--> 处理依赖关系 libmpfr.so.1()(64bit),它被软件包 cpp-4.4.7-16.el6.x86_64 需要
---> Package libgomp.x86_64 0:4.4.7-16.el6 will be 安装
--> 执行事务检查
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be 安装
---> Package ppl.x86_64 0:0.10.2-11.el6 will be 安装
--> 完成依赖关系计算

依赖关系解决

==========================================================================================================================
 软件包                   架构                  版本                             仓库                                大小
==========================================================================================================================
正在安装:
 autoconf                 noarch                2.63-5.1.el6                     Centos-source-local                781 k
 automake                 noarch                1.11.1-4.el6                     Centos-source-local                550 k
 gcc                      x86_64                4.4.7-16.el6                     Centos-source-local                 10 M
 libtool                  x86_64                2.2.6-15.5.el6                   Centos-source-local                564 k
为依赖而安装:
 cloog-ppl                x86_64                0.15.7-1.2.el6                   Centos-source-local                 93 k
 cpp                      x86_64                4.4.7-16.el6                     Centos-source-local                3.7 M
 libgomp                  x86_64                4.4.7-16.el6                     Centos-source-local                134 k
 mpfr                     x86_64                2.4.1-6.el6                      Centos-source-local                157 k
 ppl                      x86_64                0.10.2-11.el6                    Centos-source-local                1.3 M

事务概要
==========================================================================================================================
Install       9 Package(s)

总下载量:17 M
Installed size: 39 M
下载软件包:
--------------------------------------------------------------------------------------------------------------------------
总计                                                                                       40 MB/s |  17 MB     00:00     
运行 rpm_check_debug 
执行事务测试
事务测试成功
执行事务
  正在安装   : autoconf-2.63-5.1.el6.noarch                                                                           1/9 
  正在安装   : automake-1.11.1-4.el6.noarch                                                                           2/9 
  正在安装   : ppl-0.10.2-11.el6.x86_64                                                                               3/9 
  正在安装   : cloog-ppl-0.15.7-1.2.el6.x86_64                                                                        4/9 
  正在安装   : mpfr-2.4.1-6.el6.x86_64                                                                                5/9 
  正在安装   : cpp-4.4.7-16.el6.x86_64                                                                                6/9 
  正在安装   : libgomp-4.4.7-16.el6.x86_64                                                                            7/9 
  正在安装   : gcc-4.4.7-16.el6.x86_64                                                                                8/9 
  正在安装   : libtool-2.2.6-15.5.el6.x86_64                                                                          9/9 
  Verifying  : libgomp-4.4.7-16.el6.x86_64                                                                            1/9 
  Verifying  : gcc-4.4.7-16.el6.x86_64                                                                                2/9 
  Verifying  : mpfr-2.4.1-6.el6.x86_64                                                                                3/9 
  Verifying  : autoconf-2.63-5.1.el6.noarch                                                                           4/9 
  Verifying  : cpp-4.4.7-16.el6.x86_64                                                                                5/9 
  Verifying  : libtool-2.2.6-15.5.el6.x86_64                                                                          6/9 
  Verifying  : ppl-0.10.2-11.el6.x86_64                                                                               7/9 
  Verifying  : cloog-ppl-0.15.7-1.2.el6.x86_64                                                                        8/9 
  Verifying  : automake-1.11.1-4.el6.noarch                                                                           9/9 

已安装:
  autoconf.noarch 0:2.63-5.1.el6 automake.noarch 0:1.11.1-4.el6 gcc.x86_64 0:4.4.7-16.el6 libtool.x86_64 0:2.2.6-15.5.el6

作为依赖被安装:
  cloog-ppl.x86_64 0:0.15.7-1.2.el6  cpp.x86_64 0:4.4.7-16.el6  libgomp.x86_64 0:4.4.7-16.el6  mpfr.x86_64 0:2.4.1-6.el6 
  ppl.x86_64 0:0.10.2-11.el6        

完毕!

 再次 执行make进行编译即可。

启动Redis

cd redis-stable/src
./redis-server 
./redis-cli 
127.0.0.1:6379> set isstech hadoop
OK
127.0.0.1:6379> get isstech
"hadoop"
127.0.0.1:6379> 

 

posted @ 2018-12-20 14:15  因为专注。所以专业  阅读(4613)  评论(0编辑  收藏  举报