|
|
# yum install -y chrony.x86_64
# ?/ o! C4 w$ x% m8 KLoaded plugins: fastestmirror$ L1 Q+ G8 X4 @# Z9 }3 |
Loading mirror speeds from cached hostfile' E8 j3 J6 d# L* J8 P4 ^) \0 h
* base: ftp.sjtu.edu.cn3 l' K+ c1 x4 D. z
* extras: mirrors.huaweicloud.com
2 T" K s) v2 K, N9 b * updates: ftp.sjtu.edu.cn! H8 Y+ ^) L. h d
base | 3.6 kB 00:00:00
+ G, Q$ @' x0 l- B' E7 Scentos-ceph-jewel | 2.9 kB 00:00:00 e+ `9 B/ d+ z8 E5 z
centos-openstack-pike | 2.9 kB 00:00:00 : T$ d. V5 t* _5 j# W
http://mirror.centos.org/altarch/7/virt/x86_64/kvm-common/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found" r+ P( d# s5 j" V9 E$ p
Trying other mirror.
5 q: G& d9 v. l6 _To address this issue please refer to the below wiki article * K: J6 W( G( g2 w" g
https://wiki.centos.org/yum-errors* N3 O4 g$ ~/ J t G2 w# j: {" X
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.8 I. d/ z$ O% k8 }4 V
% ]. W8 f( [/ C One of the configured repositories failed (CentOS-7 - QEMU EV),
& b# D0 T; ~+ ~ and yum doesn't have enough cached data to continue. At this point the only
# O! n$ h! }3 h safe thing yum can do is fail. There are a few ways to work "fix" this:
/ `& F! M3 Z+ V3 p: G; f 1. Contact the upstream for the repository and get them to fix the problem.* v1 H' t; t# ?+ }! W) x6 c3 t
2. Reconfigure the baseurl/etc. for the repository, to point to a working: q9 Q( r! @1 ~- v) I: a' C3 [3 S
upstream. This is most often useful if you are using a newer
' { Q U& X! o' [ distribution release than is supported by the repository (and the
- K7 [( T8 Z3 \ packages for the previous distribution release still work).4 K5 |4 M7 Q1 |
3. Run the command with the repository temporarily disabled
6 N# E( R& C+ u, z yum --disablerepo=centos-qemu-ev ...# |( Y# [/ Y4 s2 M
4. Disable the repository permanently, so yum won't use it by default. Yum
4 \' c0 k8 H7 V' \ will then just ignore the repository until you permanently enable it' M: E, I$ V, g ~) D$ }
again or use --enablerepo for temporary usage:) V8 U4 L$ P% w2 x' d3 ~& x
yum-config-manager --disable centos-qemu-ev* E" ~$ M$ `2 q( t
or
+ g3 A4 T4 O, G8 H! v- L$ \ subscription-manager repos --disable=centos-qemu-ev2 ?) g R4 a- Q# v, v7 ?
5. Configure the failing repository to be skipped, if it is unavailable.
$ Y T2 l5 I. x" {7 _5 K6 F Note that yum will try to contact the repo. when it runs most commands,
, @1 w) Z! k9 ]3 T" F so will have to try and fail each time (and thus. yum will be be much
# w! ~* f9 z5 S2 w( Z- g slower). If it is a very temporary problem though, this is often a nice
; o! A+ O5 O# C. N) D& x% l8 ] compromise:* c9 R0 l+ Q! o- {* g- H
yum-config-manager --save --setopt=centos-qemu-ev.skip_if_unavailable=true
5 S2 o5 b, L% y9 L: y5 Nfailure: repodata/repomd.xml from centos-qemu-ev: [Errno 256] No more mirrors to try.
5 _. Q! @& N7 D0 {http://mirror.centos.org/altarch/7/virt/x86_64/kvm-common/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found9 w h6 C1 O* X' I- [
+ K, ^) ~ P( \3 B1 r; p
报错原因是因为yum源配置文件CentOS-QEMU-EV.repo有问题,需要验证所以会报错。5 W, E; Q# @% @3 a! T" ~( H' ^1 |$ W
# vim /etc/yum.repos.d/CentOS-QEMU-EV.repo
/ r. ~3 F& t: I; ~8 o$ [8 I V将默认状态的
9 d( k* @9 _& R4 f, _$ agpgcheck=1/ H3 c, \: }% K! {( ?
enabled=1
& q( |* N/ ^6 b' F修改为:6 q3 Y% L4 r0 {: K( s
8 v5 o( R, z1 F/ Xgpgcheck=0' F" J. X1 p- j6 U8 z ?. R% F
enabled=0
+ y" t1 I; _2 A, S$ b+ \# u) i( E& W4 i9 }4 G) y- k
再次安装就不会出现问题了。& e; f* O4 r: M) h6 R9 S
|
|