Topwo博客
首页
博客
项目
您现在的位置是:
Topwo博客
>>
其他
文章
yum无法使用
发布时间:2021-11-17
作者:Topwo
来源:原创
点击:353
`yum -y install xxx`报错: ``` Loaded plugins: fastestmirror Determining fastest mirrors 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 <repo> To enable custom repositories: yum-config-manager --enable <repo> ``` ## 1.检查是否断网 ```shell ping baidu.com ``` ## 2.如果没断网,则说明是yum镜像没有了,需要下载一个: ```shell cd /etc/yum.repos.d mv CentOS-Base.repo CentOS-Base.repo.backup wget http://mirrors.163.com/.help/CentOS6-Base-163.repo mv CentOS6-Base-163.repo CentOS-Base.repo yum clean all ``` 或者 ```shell curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo ```
上一篇:
Gradle中常用的路径环境变量
下一篇:
Nginx安装与使用