备份配置文件,防止以后出错后不好恢复
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
执行下面命令,新建CentOS-Base.repo配置:
vim /etc/yum.repos.d/CentOS-Base.repo
复制粘贴如下命令
[centos-office]
name=centos-office
failovermethod=priority
baseurl=https://vault.centos.org/6.10/os/x86_64/
gpgcheck=1
gpgkey=https://vault.centos.org/6.10/os/x86_64/RPM-GPG-KEY-CentOS-6
保存后退出
执行yum list 正常无报错
此时即可正常使用yum命令了。
相关文章
- 02-09安装yum 提示 cannot find a valid baseurl for repo:base/7/x86_64
- 02-09Cannot find a valid baseurl for repo: base/7/x86_64
- 02-09centos6 使用yum报错Error: Cannot find a valid baseurl for repo: base
- 02-09Error: Cannot find a valid baseurl for repo: base
- 02-09Cannot find a valid baseurl for repo...【CentOS 6.8】
- 02-09Cannot find a valid baseurl for repo: HDP-3.1-repo-1或者ambari错误Connection to vm-16-6-centos closed.解决
- 02-09Linux安装Apache报错:Cannot find a valid baseurl for repo: base/7/x86_64解决方案
- 02-09CENTOS7错误:Cannot find a valid baseurl for repo: base/7/x86_6
- 02-09CentOS7系统局域网内配置本地yum源解决cannot find a valid baseurl for repo
- 02-09安装CentOS7后,无法联网,用yum安装软件提示 cannot find a valid baseurl for repo:base/7/x86_64 的解决方法