使用如下兩個指令就可把gcc,gcc-c++統統安裝
yum -y install gcc
yum -y install gcc-c++
安裝gcc
安裝gcc-c++
'
安裝日志:
[[email protected] ~]# yum -y install gcc
已加載插件:fastestmirror, refresh-packagekit, security
設定安裝程序
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
解決依賴關系
--> 執行事務檢查
---> Package gcc.x86_64 0:4.4.7-18.el6 will be 安裝
--> 處理依賴關系 libgomp = 4.4.7-18.el6,它被軟體包 gcc-4.4.7-18.el6.x86_64 需要
--> 處理依賴關系 cpp = 4.4.7-18.el6,它被軟體包 gcc-4.4.7-18.el6.x86_64 需要
--> 處理依賴關系 libgcc >= 4.4.7-18.el6,它被軟體包 gcc-4.4.7-18.el6.x86_64 需要
--> 處理依賴關系 cloog-ppl >= 0.15,它被軟體包 gcc-4.4.7-18.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-18.el6 will be 安裝
--> 處理依賴關系 libmpfr.so.1()(64bit),它被軟體包 cpp-4.4.7-18.el6.x86_64 需要
---> Package libgcc.x86_64 0:4.4.7-17.el6 will be 更新
---> Package libgcc.x86_64 0:4.4.7-18.el6 will be an update
---> Package libgomp.x86_64 0:4.4.7-17.el6 will be 更新
---> Package libgomp.x86_64 0:4.4.7-18.el6 will be an update
--> 執行事務檢查
---> 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-18.el6 base 10 M
為依賴而安裝:
cloog-ppl x86_64 0.15.7-1.2.el6 base 93 k
cpp x86_64 4.4.7-18.el6 base 3.7 M
mpfr x86_64 2.4.1-6.el6 base 157 k
ppl x86_64 0.10.2-11.el6 base 1.3 M
為依賴而更新:
libgcc x86_64 4.4.7-18.el6 base 103 k
libgomp x86_64 4.4.7-18.el6 base 134 k
事務概要
===============================================================================================================================================================================================
Install 5 Package(s)
Upgrade 2 Package(s)
總下載下傳量:16 M
下載下傳軟體包:
(1/7): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm | 93 kB 00:00
(2/7): cpp-4.4.7-18.el6.x86_64.rpm | 3.7 MB 00:01
(3/7): gcc-4.4.7-18.el6.x86_64.rpm | 10 MB 00:03
(4/7): libgcc-4.4.7-18.el6.x86_64.rpm | 103 kB 00:00
(5/7): libgomp-4.4.7-18.el6.x86_64.rpm | 134 kB 00:00
(6/7): mpfr-2.4.1-6.el6.x86_64.rpm | 157 kB 00:00
(7/7): ppl-0.10.2-11.el6.x86_64.rpm | 1.3 MB 00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
總計 2.2 MB/s | 16 MB 00:07
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid: "CentOS-6 Key (CentOS 6 Official Signing Key) <[email protected]>"
From : http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6
運作 rpm_check_debug
執行事務測試
事務測試成功
執行事務
正在更新 : libgcc-4.4.7-18.el6.x86_64 1/9
正在安裝 : ppl-0.10.2-11.el6.x86_64 2/9
正在安裝 : cloog-ppl-0.15.7-1.2.el6.x86_64 3/9
正在安裝 : mpfr-2.4.1-6.el6.x86_64 4/9
正在安裝 : cpp-4.4.7-18.el6.x86_64 5/9
正在更新 : libgomp-4.4.7-18.el6.x86_64 6/9
正在安裝 : gcc-4.4.7-18.el6.x86_64 7/9
清理 : libgcc-4.4.7-17.el6.x86_64 8/9
清理 : libgomp-4.4.7-17.el6.x86_64 9/9
Verifying : cpp-4.4.7-18.el6.x86_64 1/9
Verifying : libgomp-4.4.7-18.el6.x86_64 2/9
Verifying : mpfr-2.4.1-6.el6.x86_64 3/9
Verifying : libgcc-4.4.7-18.el6.x86_64 4/9
Verifying : gcc-4.4.7-18.el6.x86_64 5/9
Verifying : ppl-0.10.2-11.el6.x86_64 6/9
Verifying : cloog-ppl-0.15.7-1.2.el6.x86_64 7/9
Verifying : libgcc-4.4.7-17.el6.x86_64 8/9
Verifying : libgomp-4.4.7-17.el6.x86_64 9/9
已安裝:
gcc.x86_64 0:4.4.7-18.el6
作為依賴被安裝:
cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-18.el6 mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6
作為依賴被更新:
libgcc.x86_64 0:4.4.7-18.el6 libgomp.x86_64 0:4.4.7-18.el6
完畢!
[[email protected] ~]# yum -y install gcc-c++
已加載插件:fastestmirror, refresh-packagekit, security
設定安裝程序
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
解決依賴關系
--> 執行事務檢查
---> Package gcc-c++.x86_64 0:4.4.7-18.el6 will be 安裝
--> 處理依賴關系 libstdc++-devel = 4.4.7-18.el6,它被軟體包 gcc-c++-4.4.7-18.el6.x86_64 需要
--> 處理依賴關系 libstdc++ = 4.4.7-18.el6,它被軟體包 gcc-c++-4.4.7-18.el6.x86_64 需要
--> 執行事務檢查
---> Package libstdc++.x86_64 0:4.4.7-17.el6 will be 更新
---> Package libstdc++.x86_64 0:4.4.7-18.el6 will be an update
---> Package libstdc++-devel.x86_64 0:4.4.7-18.el6 will be 安裝
--> 完成依賴關系計算
依賴關系解決
===============================================================================================================================================================================================
軟體包 架構 版本 倉庫 大小
===============================================================================================================================================================================================
正在安裝:
gcc-c++ x86_64 4.4.7-18.el6 base 4.7 M
為依賴而安裝:
libstdc++-devel x86_64 4.4.7-18.el6 base 1.6 M
為依賴而更新:
libstdc++ x86_64 4.4.7-18.el6 base 295 k
事務概要
===============================================================================================================================================================================================
Install 2 Package(s)
Upgrade 1 Package(s)
總下載下傳量:6.6 M
下載下傳軟體包:
(1/3): gcc-c++-4.4.7-18.el6.x86_64.rpm | 4.7 MB 00:01
(2/3): libstdc++-4.4.7-18.el6.x86_64.rpm | 295 kB 00:00
(3/3): libstdc++-devel-4.4.7-18.el6.x86_64.rpm | 1.6 MB 00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
總計 2.1 MB/s | 6.6 MB 00:03
運作 rpm_check_debug
執行事務測試
事務測試成功
執行事務
正在更新 : libstdc++-4.4.7-18.el6.x86_64 1/4
正在安裝 : libstdc++-devel-4.4.7-18.el6.x86_64 2/4
正在安裝 : gcc-c++-4.4.7-18.el6.x86_64 3/4
清理 : libstdc++-4.4.7-17.el6.x86_64 4/4
Verifying : gcc-c++-4.4.7-18.el6.x86_64 1/4
Verifying : libstdc++-devel-4.4.7-18.el6.x86_64 2/4
Verifying : libstdc++-4.4.7-18.el6.x86_64 3/4
Verifying : libstdc++-4.4.7-17.el6.x86_64 4/4
已安裝:
gcc-c++.x86_64 0:4.4.7-18.el6
作為依賴被安裝:
libstdc++-devel.x86_64 0:4.4.7-18.el6
作為依賴被更新:
libstdc++.x86_64 0:4.4.7-18.el6
完畢!
[[email protected] ~]#