离线安装gcc,按照如下步骤rpm -ivh mpfr-3.1.1-4.el7.x86_64.rpm rpm -ivh libmpc-1.0.1-3.el7.x86_64.rpm rpm -ivh kernel-headers-3.10.0-123.el7.x86_64.rpm rpm -ivh glibc-headers-2.17-55.el7.x86_64.rpm rpm -ivh glibc-devel-2.17-55.el7.x86_64.rpm rpm -ivh cpp-4.8.2-16.el7.x86_64.rpm rpm -ivh gcc-4.8.2-16.el7.x86_64.