centos 更换源出现问题

水静流深308 2015-07-29 09:05:13
安装centos后,准备配置163的源

cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.bk
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
mv CentOS6-Base-163.repo CentOS-Base.repo
yum clean all
yum update
yum makecache
出现问题:

[root@localhost yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
http://mirrors.sohu.com/centos/7/addons/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
http://mirror.centos.org/centos/7/addons/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.


One of the configured repositories failed (CentOS-7 - Addons - sohu.com),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Disable the repository, so yum won't use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
--enablerepo for temporary usage:

yum-config-manager --disable addons

4. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=addons.skip_if_unavailable=true

failure: repodata/repomd.xml from addons: [Errno 256] No more mirrors to try.
http://mirrors.sohu.com/centos/7/addons/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
http://mirror.centos.org/centos/7/addons/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

请问,如何解决?163的源不可以用了吗?
...全文
28566 10 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
污妖王之怒 2019-07-16
  • 打赏
  • 举报
回复
这个是我的解决方式,大家可以试试,对大家有帮助最好,每个人的情况都不太一样,希望大家互相分享解决方案https://blog.csdn.net/zhangzhen53377562/article/details/96098763
管管qi 2018-12-12
  • 打赏
  • 举报
回复
请问你后来怎么解决了?我也是遇到这样的提示,如果解决了。麻烦详细告诉我解决方案,谢谢啦!我的邮箱1401194536@qq.com 谢谢啦!!
放心飞吧 2017-01-12
  • 打赏
  • 举报
回复
我遇到过,重启机器就好了
bushiBOB 2017-01-07
  • 打赏
  • 举报
回复
sing a song_^^ 2016-11-13
  • 打赏
  • 举报
回复
同求:!!!!!我在曙光公司的服务器上安装centos 7,提示错误no more mirrors to try
KEL-1 2015-08-01
  • 打赏
  • 举报
回复
更换配置文件中的地址就好了,其他的就不需要改变了
KEL-1 2015-07-29
  • 打赏
  • 举报
回复
你的源地址是错误,你必须根据你得到的地址能找到那个repond.xml文件,我看了一下,好像是这个地址 http://mirror.centos.org/centos/7/os/x86_64/repodata/ 在7这个目录下是没有addons这个文件夹的。
Ice_24 2015-07-29
  • 打赏
  • 举报
回复
http://mirrors.163.com/.help/CentOS7-Base-163.repo 换成7.X版本应该就好了把。
JPF1024 2015-07-29
  • 打赏
  • 举报
回复
http://mirrors.aliyun.com/ http://mirrors.sohu.com/ 这两个都可以的、还有交大的,还有中科大,你自己搜索下。
水静流深308 2015-07-29
  • 打赏
  • 举报
回复
那我怎么办?可否给个centos7下面可以用的 CentOS-Base.repo 配置文件?

19,620

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧