使用yum安装gcc
yum -y install gcc gcc-c++ kernel-devel //安装gcc、c++编译器以及内核文件
ependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
gcc x86_64 4.8.5-44.el7 base 16 M
gcc-c++ x86_64 4.8.5-44.el7 base 7.2 M
kernel-devel x86_64 3.10.0-1160.11.1.el7 updates 18 M
Installing for dependencies:
cpp x86_64 4.8.5-44.el7 base 5.9 M
glibc-devel x86_64 2.17-317.el7 base 1.1 M
glibc-headers x86_64 2.17-317.el7 base 690 k
kernel-headers x86_64 3.10.0-1160.11.1.el7 updates 9.0 M
libstdc++-devel x86_64 4.8.5-44.el7 base 1.5 M
Updating for dependencies:
glibc x86_64 2.17-317.el7 base 3.6 M
glibc-common x86_64 2.17-317.el7 base 11 M
libgcc x86_64 4.8.5-44.el7 base 103 k
libgomp x86_64 4.8.5-44.el7 base 159 k
libstdc++ x86_64 4.8.5-44.el7 base 306 k
Transaction Summary
================================================================================
Install 3 Packages (+5 Dependent packages)
Upgrade ( 5 Dependent packages)
Total size: 75 M
Total download size: 60 M
Is this ok [y/d/N]:
原文:https://www.cnblogs.com/xhdy/p/14342623.html