找回密码
 注册
查看: 3483|回复: 0

yum源报错

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2018-7-19 23:50:20 | 显示全部楼层 |阅读模式
# yum install -y chrony.x86_64 2 D) s# U; m9 k$ l+ V& ]
Loaded plugins: fastestmirror
% l3 A+ a5 f$ ~: C# o9 GLoading mirror speeds from cached hostfile
8 K. A$ |: G# ~1 c7 { * base: ftp.sjtu.edu.cn
3 P+ E7 c  c- D" w" \$ j * extras: mirrors.huaweicloud.com
( ?, N0 }" w! g) U+ {2 |$ r * updates: ftp.sjtu.edu.cn
  v1 \2 n! K) O1 j" y  qbase                                                                                                     | 3.6 kB  00:00:00     , G' w3 i/ f7 ~1 O
centos-ceph-jewel                                                                                        | 2.9 kB  00:00:00     
$ u' H% b( }. j& d3 W2 Jcentos-openstack-pike                                                                                    | 2.9 kB  00:00:00     : D3 e4 Q" W2 ^5 J8 C
http://mirror.centos.org/altarch/7/virt/x86_64/kvm-common/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found8 m0 {  |3 d2 G
Trying other mirror.
8 q0 X: c5 B& S6 }- h: \To address this issue please refer to the below wiki article + |1 m/ b$ g7 ]* Q  I
https://wiki.centos.org/yum-errors) o  r  a, B9 h  n. d7 @1 ^' g
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
8 Q8 t* \, p! z" F/ }. c
  S  r9 l" N- r7 Z1 q5 [ One of the configured repositories failed (CentOS-7 - QEMU EV),* @# x9 b( q- b3 z& `3 b  G3 ^
and yum doesn't have enough cached data to continue. At this point the only- \8 q  n& S% E  g$ [
safe thing yum can do is fail. There are a few ways to work "fix" this:
4 N. }* x1 P! D1 K     1. Contact the upstream for the repository and get them to fix the problem.& ], T# X# A. j: X
     2. Reconfigure the baseurl/etc. for the repository, to point to a working
0 L* l+ a7 K9 L1 }        upstream. This is most often useful if you are using a newer" E; _! A0 w( a& u
        distribution release than is supported by the repository (and the
. c0 M7 y9 s1 `* x, M3 B3 a        packages for the previous distribution release still work).
% @8 _" \1 h+ d1 I  |1 v) d, ~     3. Run the command with the repository temporarily disabled
/ r/ k) d- z4 g1 ?            yum --disablerepo=centos-qemu-ev ...
- H1 U% }' A* h' Q$ v+ R  _- t3 d  q3 r% s     4. Disable the repository permanently, so yum won't use it by default. Yum- \1 [  v- W. q+ M8 n
        will then just ignore the repository until you permanently enable it6 C, D2 a+ n9 w$ z- ^
        again or use --enablerepo for temporary usage:- g7 q( }' G6 H" K
            yum-config-manager --disable centos-qemu-ev$ p" z' F( L6 e8 \7 s+ P
        or
3 @1 \9 B) u2 s; @2 L            subscription-manager repos --disable=centos-qemu-ev7 j7 @. f% c9 }3 H# j; u) v8 X; V" A
     5. Configure the failing repository to be skipped, if it is unavailable.
7 U' a2 z5 Y& Y' O0 f1 }        Note that yum will try to contact the repo. when it runs most commands,
/ ]# d3 o, u" W4 k; n        so will have to try and fail each time (and thus. yum will be be much
( i& [+ h( d/ T' }1 j        slower). If it is a very temporary problem though, this is often a nice! w$ n- F! R3 g" `# @& x2 }$ ^$ Y
        compromise:( `  o; }4 x' A$ L2 {$ D6 m
            yum-config-manager --save --setopt=centos-qemu-ev.skip_if_unavailable=true  h- b6 B. ^% v9 ]- h6 O: ^6 G. G
failure: repodata/repomd.xml from centos-qemu-ev: [Errno 256] No more mirrors to try.
. t( V4 E& K0 y, mhttp://mirror.centos.org/altarch/7/virt/x86_64/kvm-common/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found7 V/ l( p$ c# x+ K( g( l& U

% \& I- V- J0 w& H3 n5 z! X报错原因是因为yum源配置文件CentOS-QEMU-EV.repo有问题,需要验证所以会报错。
3 @1 ~" Y9 n" @2 q# vim /etc/yum.repos.d/CentOS-QEMU-EV.repo
9 u% h) o" s6 c, _& e! t2 g" L将默认状态的
9 Q  T1 p7 O/ M  jgpgcheck=1: k; j, g  z/ a
enabled=1
. `1 r3 v/ g7 `* ~修改为:
; H$ V, [6 A! o6 h. @
* r  b  I/ ^* v- f  k3 S/ Vgpgcheck=0
  D+ G* Z# g" F3 F1 |" \  ~enabled=0
# [9 n$ J4 ~0 I9 u/ Q
, s8 h8 @1 g" E6 c再次安装就不会出现问题了。
% C. H9 C: y8 v% ]6 ~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 02:36 , Processed in 0.015249 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表