yum下载工具包时无法下载

更换centos源

 

命令如下:

        

There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable 
 To enable custom repositories:
     yum-config-manager --enable 

  

yum -y install yum-utils

如果不能运行先试着更换yum源:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

 

 

 

 

你可能感兴趣的:(linux)