报错日志
( {3 g$ y \. v/ ?: q: MLoading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org?arch=x86_64&release=7&repo=sclo-rh error was 14: curl#6 - "Could not resolve host mirrorlist.centos.org: ; 未知的错误" 5 B6 K5 X# h+ v/ E ^$ Z7 q2 M' o7 }/ F
原因:mirrorlist.centos.org 不再被支持 $ J8 @! ~( L- E' D2 o
" }* V' X) ]8 V9 H
解决方法
. U1 A. C! O& T' _sudo sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo 2 z) b0 \0 I* |* ?: j: ~; k
sudo sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo ( W" x; o, [3 w
sudo sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo ! u( W5 q/ a/ e7 T8 j
( U6 g6 R! r. d) p% b |