linux中没有默认安装的gcc

这里直接去  http://mirrors.163.com/centos/7/os/x86_64/Packages/ 下载文件

可以先下载到本地再传到linux 或者 在linux 中直接 wget下载

  1. wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
  2. wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
  3. wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-154.el7.centos.noarch.rpm
  4. wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm

如果地址404就根据 rpm包名找到对应的版本下载即可

 

 

安装 rpm包 

  1. rpm -ivh  python-iniparse-0.4-9.el7.noarch.rpm
  2. rpm -ivh yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
  3. rpm -ivh yum-3.4.3-154.el7.centos.noarch.rpm
  4. rpm -ivh yum-plugin-fastestmirror-1.1.31-42.el7.noarch.rpm

安装后可通过命令查看:

rpm -qa |grep yum

[root@localhost app]#  rpm -qa |grep yum 
yum-3.4.3-161.el7.centos.noarch
yum-plugin-fastestmirror-1.1.31-50.el7.noarch
yum-utils-1.1.31-54.el7_8.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64

将CentOS的yyum源的配置文件 更新到centos中

http://mirrors.163.com/.help/CentOS7-Base-163.repo

清除并重新缓存服务器的包信息

安装

yum install gcc

 

Logo

更多推荐