昨天在服务区上做了一些关于网络方面的改动,今天发现yum install用不了了,然后就去更新,结果总是一次次超时。
1,1 全部
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 base
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=base.skip_if_unavailable=true
failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
搜索了以下文章,结果都没有成功
wwwxz.blog.csdn.net/article/det…
这是阿里云官方的说法
甚至怀疑是DNS的问题
山穷水尽之时,灵机一动
到底这个超时的url是个什么情况?
很具有欺骗性的是,这个url在电脑上打开完全正常,但是在服务器上执行:
curl http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml
会打印出内容,但不会像别的打印完推出,就卡住在那了!🤮
用wget也是一直读去的状态,大概就是这个url没有返回内容的长度,导致一直在等待文件结尾标记的一种状态!
所以make cache的时候就会一直报告超时,哪怕修改了超时时间也没有作用。
索性一口气换成中科大的源。再执行
yum clean all
yum makecache
终于正常了!
阿里云妮可拉倒霸!