|
|
# yum install -y chrony.x86_64
0 g" k1 q* G( L3 f4 M& X, X6 {" L' U, PLoaded plugins: fastestmirror
1 Y, ]& ~" E0 q. MLoading mirror speeds from cached hostfile) `. Z4 g3 Q! z4 }; H0 J) A' B
* base: ftp.sjtu.edu.cn2 ]" y+ p- K5 D& D; N Q
* extras: mirrors.huaweicloud.com
. e7 u0 u: ]; d: N+ q * updates: ftp.sjtu.edu.cn
8 N# y. Q# M9 jbase | 3.6 kB 00:00:00 & l2 F. o4 ^8 C) X
centos-ceph-jewel | 2.9 kB 00:00:00 , l' |9 `% J1 K: G+ Q- q
centos-openstack-pike | 2.9 kB 00:00:00 ' |9 g0 q1 Y, T7 |7 j6 n6 _% R5 z
http://mirror.centos.org/altarch/7/virt/x86_64/kvm-common/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
1 ?) M; w2 Y5 L. Z! x, R3 ETrying other mirror.
3 Z7 {2 k }2 c2 I. J" `1 G: uTo address this issue please refer to the below wiki article
0 R% D! Y# X7 a/ r, R# Zhttps://wiki.centos.org/yum-errors
, V4 p4 B, d8 u# h# }If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
2 M! J/ q( g+ p5 q E6 y5 Q0 W0 |0 Y3 y/ U6 _. H* }1 A; e
One of the configured repositories failed (CentOS-7 - QEMU EV),& Q+ j; \& `: \- i7 b( U3 N
and yum doesn't have enough cached data to continue. At this point the only, e3 U, u- q& Q4 b/ r0 F+ Z
safe thing yum can do is fail. There are a few ways to work "fix" this:
2 T4 Q. ?) Y9 I; G; X% y 1. Contact the upstream for the repository and get them to fix the problem.- z7 x2 B' y/ ^' ~, I k- u+ ^# D; _
2. Reconfigure the baseurl/etc. for the repository, to point to a working
( k; Q/ {$ B0 _% | { upstream. This is most often useful if you are using a newer' }& E. M, A, k' y i0 j {
distribution release than is supported by the repository (and the
! n4 p5 W- Y% A' @7 U packages for the previous distribution release still work).
9 \% d2 R- F1 t9 i# w 3. Run the command with the repository temporarily disabled' l5 O! O+ ?8 F8 [3 M5 y# Z
yum --disablerepo=centos-qemu-ev ...
2 v2 F4 _# h0 l) Q5 j 4. Disable the repository permanently, so yum won't use it by default. Yum
9 Q# j9 f/ W9 a7 U9 X2 A: x- L% g will then just ignore the repository until you permanently enable it
# j& f5 E7 c' I# @ again or use --enablerepo for temporary usage:6 O' E1 b \5 r B R$ ^) L, {
yum-config-manager --disable centos-qemu-ev7 z1 J: O4 l& ~+ C
or
2 m2 _( e# ?9 d3 q+ F" y subscription-manager repos --disable=centos-qemu-ev
% S9 ]$ w& r( s5 o( ?& \ 5. Configure the failing repository to be skipped, if it is unavailable., Y/ _. Y$ i7 I; M, t7 I8 w& [* r
Note that yum will try to contact the repo. when it runs most commands,6 p: i, V. N6 c( g/ o. a
so will have to try and fail each time (and thus. yum will be be much; m. H6 w% ^- l* C4 e
slower). If it is a very temporary problem though, this is often a nice
2 w7 ]: @2 r6 a! S6 I, Y, W compromise:
! J( V, T; k# K1 I4 v yum-config-manager --save --setopt=centos-qemu-ev.skip_if_unavailable=true
! u0 d, |( j% V) k# I# dfailure: repodata/repomd.xml from centos-qemu-ev: [Errno 256] No more mirrors to try.
" z6 d5 I( ]- D+ U4 W* {http://mirror.centos.org/altarch/7/virt/x86_64/kvm-common/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
4 p" x& w" i9 M9 e; A$ m& M+ A5 V/ y3 z3 i5 i
报错原因是因为yum源配置文件CentOS-QEMU-EV.repo有问题,需要验证所以会报错。4 C2 l, @4 O3 z- W
# vim /etc/yum.repos.d/CentOS-QEMU-EV.repo
9 R" l) \0 l4 T; \将默认状态的
! m% [% r" e M, u( pgpgcheck=1
( L1 Z, t. V3 \, A& ienabled=16 g$ t1 J: k: ~, O
修改为:% S: k [9 z1 F; f$ d9 ]
?7 x3 g+ V3 K) `3 Tgpgcheck=0# R- L: N# j( v. @' J6 }
enabled=0
% {# _$ z9 d8 x; i0 Y. w6 q7 d- |' Z8 ^& i
再次安装就不会出现问题了。
$ j5 N1 Y+ |" G7 g* K |
|