centOS7 yum install git 失败

1.现象

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: mirrors.bfsu.edu.cn
No package git available.

2.处理

  1. 安装配置文件

    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    yum clean all  #清除所有
    yum makecache #重新建立源数据
    

  2. yum install git

    
    Installed:
      git.x86_64 0:1.8.3.1-25.el7_9                                                                                                                                                                     
    
    Dependency Installed:
      perl-Error.noarch 1:0.17020-2.el7                              perl-Git.noarch 0:1.8.3.1-25.el7_9                              perl-TermReadKey.x86_64 0:2.30-20.el7                             
    
    Complete!

猜你喜欢

转载自blog.csdn.net/Eric_ChenXiao/article/details/131718875