CentOS6 安装gcc编译器,解决【configure: error: no acceptable C compiler found in $PATH】问题

该博客主要介绍了如何在CentOS6系统上安装GCC编译器,以解决在编译ntfs-3g_ntfsprogs-2021.8.22时遇到的‘configure: error: no acceptable C compiler found in $PATH’问题。博主选择了通过配置本地yum源进行安装,详细步骤包括查看本地gcc安装包、安装gcc.x86_64和gcc-c++.x86_64,最后验证安装成功。
摘要由CSDN通过智能技术生成

前言:

        编译文件 ntfs-3g_ntfsprogs-2021.8.22 时报缺少C编译器错误,所以需要安装gcc编译器。绿色字体标注即是错误提示。

[root@localhost ntfs-3g_ntfsprogs-2021.8.22]# ./configure 
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

安装方式:

        1、yum在线安装,需要配置CentOS-Base.repo(本次未采用此方法)

        2、配置本地yum源,进行安装(采用)

 配置本地yum源直通车:

CentOS6 搭建本地光盘yum源_走向运维的老男孩的博客-CSDN博客

安装步骤:

第一步、查看本地gcc安装包

[root@localhost yum.repos.d]# yum list | grep gcc
libgcc.x86_64                               4.4.7-17.el6                @anaconda-CentOS-201605220104.x86_64/6.8
compat-gcc-34.x86_64                        3.4.6-19.el6                c6-media
compat-gcc-34-c++.x86_64                    3.4.6-19.el6                c6-media
compat-gcc-34-g77.x86_64                    3.4.6-19.el6                c6-media
gcc.x86_64                                  4.4.7-17.el6                c6-media
gcc-c++.x86_64                              4.4.7-17.el6                c6-media
gcc-gfortran.x86_64                         4.4.7-17.el6                c6-media
gcc-gnat.x86_64                             4.4.7-17.el6                c6-media
gcc-java.x86_64                             4.4.7-17.el6                c6-media
gcc-objc.x86_64                             4.4.7-17.el6                c6-media
gcc-objc++.x86_64                           4.4.7-17.el6                c6-media
libgcc.i686                                 4.4.7-17.el6                c6-media

        说明:我们这里需要安装两个安装包:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

走向运维的老男孩

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

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

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

打赏作者

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

抵扣说明:

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

余额充值