源码编译时出现: configure: error: no acceptable C compiler found in $PATH 解决方式

$ ./configure
。。。。。
configure: error: no acceptable C compiler found in $PATH

按提示就是 要装下gcc,可是之前装好的系统 ,也用centos7 DVD 2009版都重新安装过,也还是会出现这个。
今天再次重新安装了下CentOS-7-x86_64-Everything-2009;

# yum install -y gcc
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.bupt.edu.cn
 * extras: mirrors.bupt.edu.cn
 * updates: mirrors.bupt.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 gcc.x86_64.0.4.8.5-44.el7 将被 安装
--> 正在处理依赖关系 cpp = 4.8.5-44.el7,它被软件包 gcc-4.8.5-44.el7.x86_64 需要
--> 正在处理依赖关系 glibc-devel >= 2.2.90-12,它被软件包 gcc-4.8.5-44.el7.x86_64 需要
--> 正在检查事务
---> 软件包 cpp.x86_64.0.4.8.5-44.el7 将被 安装
---> 软件包 glibc-devel.x86_64.0.2.17-324.el7_9 将被 安装
--> 正在处理依赖关系 glibc-headers = 2.17-324.el7_9,它被软件包 glibc-devel-2.17-324.el7_9.x86_64 需要
--> 正在处理依赖关系 glibc = 2.17-324.el7_9,它被软件包 glibc-devel-2.17-324.el7_9.x86_64 需要
--> 正在处理依赖关系 glibc-headers,它被软件包 glibc-devel-2.17-324.el7_9.x86_64 需要
--> 正在检查事务
---> 软件包 glibc.x86_64.0.2.17-317.el7 将被 升级
--> 正在处理依赖关系 glibc = 2.17-317.el7,它被软件包 glibc-common-2.17-317.el7.x86_64 需要
---> 软件包 glibc.x86_64.0.2.17-324.el7_9 将被 更新
---> 软件包 glibc-headers.x86_64.0.2.17-324.el7_9 将被 安装
--> 正在处理依赖关系 kernel-headers >= 2.2.1,它被软件包 glibc-headers-2.17-324.el7_9.x86_64 需要
--> 正在处理依赖关系 kernel-headers,它被软件包 glibc-headers-2.17-324.el7_9.x86_64 需要
--> 正在检查事务
---> 软件包 glibc-common.x86_64.0.2.17-317.el7 将被 升级
---> 软件包 glibc-common.x86_64.0.2.17-324.el7_9 将被 更新
---> 软件包 kernel-headers.x86_64.0.3.10.0-1160.36.2.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

=========================================================================================================
 Package                   架构              版本                               源                  大小
=========================================================================================================
正在安装:
 gcc                       x86_64            4.8.5-44.el7                       base                16 M
为依赖而安装:
 cpp                       x86_64            4.8.5-44.el7                       base               5.9 M
 glibc-devel               x86_64            2.17-324.el7_9                     updates            1.1 M
 glibc-headers             x86_64            2.17-324.el7_9                     updates            691 k
 kernel-headers            x86_64            3.10.0-1160.36.2.el7               updates            9.0 M
为依赖而更新:
 glibc                     x86_64            2.17-324.el7_9                     updates            3.6 M
 glibc-common              x86_64            2.17-324.el7_9                     updates             12 M

事务概要
=========================================================================================================
安装  1 软件包 (+4 依赖软件包)
升级           ( 2 依赖软件包)
。。。。。。。。。。。。。。。。
已安装:
  gcc.x86_64 0:4.8.5-44.el7                                                                              

作为依赖被安装:
  cpp.x86_64 0:4.8.5-44.el7                       glibc-devel.x86_64 0:2.17-324.el7_9                   
  glibc-headers.x86_64 0:2.17-324.el7_9           kernel-headers.x86_64 0:3.10.0-1160.36.2.el7          

作为依赖被升级:
  glibc.x86_64 0:2.17-324.el7_9                   glibc-common.x86_64 0:2.17-324.el7_9                  

完毕!

好像比之 前的 kernel-headers,在版本上有所区别。
再次执行编译,顺利完成了

# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /usr/bin/grep
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for strip... strip

........

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ives

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值