前言:
编译文件 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
:这里需要安装两个安装包:和,安装包的来源可以从上面的代码块中看到【c6-media】,这就是我们配置本地光盘的原因yum源的名字,反向证明我们yum源头已经启用。
第二步,安装gcc.x86_64
[root@localhost yum.repos.d]# yum -y install gcc 已加载的插件:fastestmirror, security 设置安装过程 Loading mirror speeds from cached hostfile 解决依赖关系 --> 检查执行事务 ---> Package gcc.x86_64 0:4.4.7-17.el6 will be 安装 --> 处理依赖关系 cpp = 4.4.7-17.el6,它被软件包 gcc-4.4.7-17.el6.x86_64 需要 --> 处理依赖关系 cloog-ppl >= 0.15,它被软件包 gcc-4.4.7-17.el6.x86_64 需要 --> 检查执行事务 ---> 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-17.el6 will be 安装 --> 处理依赖关系 libmpfr.so.1()(64bit),它被软件包 cpp-4.4.7-17.el6.x86_64 需要 --> 执行事务检查 ---> Package mpfr.x86_64 0:2.4.1-6.el6 will be 安装 ---> Package ppl.x86_64 0:0.10.2-11.el6 will be 安装 --> 完成依赖计算 依靠关系来解决 ===================================================================================================================================== 软件包 架构 版本 仓库 大小 ===================================================================================================================================== 正在安装: gcc x86_64 4.4.7-17.el6 c6-media 10 M 安装依赖: cloog-ppl x86_64 0.15.7-1.2.el6 c6-media 93 k cpp x86_64 4.4.7-17.el6 c6-media 3.7 M mpfr x86_64 2.4.1-6.el6 c6-media 157 k ppl x86_64 0.10.2-11.el6 c6-media 1.3 M 事务概要 ====================================================================================================================================
Install 5 Package(s)
总下载量:15 M
Installed size: 33 M
下载软件包:
-------------------------------------------------------------------------------------------------------------------------------------
总计 16 MB/s | 15 MB 00:00
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
Package: centos-release-6-8.el6.centos.12.3.x86_64 (@anaconda-CentOS-201605220104.x86_64/6.8)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
正在安装 : mpfr-2.4.1-6.el6.x86_64 1/5
正在安装 : cpp-4.4.7-17.el6.x86_64 2/5
正在安装 : ppl-0.10.2-11.el6.x86_64 3/5
正在安装 : cloog-ppl-0.15.7-1.2.el6.x86_64 4/5
正在安装 : gcc-4.4.7-17.el6.x86_64 5/5
Verifying : ppl-0.10.2-11.el6.x86_64 1/5
Verifying : gcc-4.4.7-17.el6.x86_64 2/5
Verifying : cpp-4.4.7-17.el6.x86_64 3/5
Verifying : cloog-ppl-0.15.7-1.2.el6.x86_64 4/5
Verifying : mpfr-2.4.1-6.el6.x86_64 5/5
已安装:
gcc.x86_64 0:4.4.7-17.el6
作为依赖被安装:
cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-17.el6 mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6
完毕!
第三步、安装gcc-c++.x86_64
[root@localhost yum.repos.d]# yum -y install gcc-c++
已加载插件:fastestmirror, security
设置安装进程
Loading mirror speeds from cached hostfile
解决依赖关系
--> 执行事务检查
---> Package gcc-c++.x86_64 0:4.4.7-17.el6 will be 安装
--> 处理依赖关系 libstdc++-devel = 4.4.7-17.el6,它被软件包 gcc-c++-4.4.7-17.el6.x86_64 需要
--> 执行事务检查
---> Package libstdc++-devel.x86_64 0:4.4.7-17.el6 will be 安装
--> 完成依赖关系计算
依赖关系解决
=====================================================================================================================================
软件包 架构 版本 仓库 大小
=====================================================================================================================================
正在安装:
gcc-c++ x86_64 4.4.7-17.el6 c6-media 4.7 M
为依赖而安装:
libstdc++-devel x86_64 4.4.7-17.el6 c6-media 1.6 M
事务概要
=====================================================================================================================================
Install 2 Package(s)
总下载量:6.3 M
Installed size: 20 M
下载软件包:
-------------------------------------------------------------------------------------------------------------------------------------
总计 31 MB/s | 6.3 MB 00:00
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
正在安装 : libstdc++-devel-4.4.7-17.el6.x86_64 1/2
正在安装 : gcc-c++-4.4.7-17.el6.x86_64 2/2
Verifying : gcc-c++-4.4.7-17.el6.x86_64 1/2
Verifying : libstdc++-devel-4.4.7-17.el6.x86_64 2/2
已安装:
gcc-c++.x86_64 0:4.4.7-17.el6
作为依赖被安装:
libstdc++-devel.x86_64 0:4.4.7-17.el6
完毕!
第四步、验证
[root@localhost yum.repos.d]# gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
Copyright © 2010 Free Software Foundation, Inc.
验证成功!
小结:
配置yum源存在和以及安装必须的依赖,那么安装必然流畅!