Centos7.5 [yum update -y] 更新报错
yum update Errno 256 No more mirrors to try
环境
CentOS Linux release 7.5.1804 (Core)
现象 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 [root@x.x.x.x ~]# yum update -y Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check ---> Package polkit.x86_64 0:0.112-18.el7 will be updated ---> Package polkit.x86_64 0:0.112-18.el7_6.1 will be an update --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================================== Package Arch Version Repository Size ============================================================================================================================================================================== Updating: polkit x86_64 0.112-18.el7_6.1 updates 168 k Transaction Summary ============================================================================================================================================================================== Upgrade 1 Package Total download size: 168 k Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. polkit-0.112-18.el7_6.1.x86_64 FAILED http://mirrors.ucloud.cn/centos/7/updates/x86_64/Packages/polkit-0.112-18.el7_6.1.x86_64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=updates clean metadata Trying other mirror. Error downloading packages: polkit-0.112-18.el7_6.1.x86_64: [Errno 256] No more mirrors to try.
解决方案 1 2 3 4 wget http://mirror.centos.org/centos/7/updates/x86_64/Packages/polkit-0.112-18.el7_6.1.x86_64.rpm sudo yum localinstall -y polkit-0.112-18.el7_6.1.x86_64.rpm # 或者 sudo yum install http://mirror.centos.org/centos/7/updates/x86_64/Packages/polkit-0.112-18.el7_6.1.x86_64.rpm -y
参考 1 https://qiita.com/HiroshiAkutsu/items/9fdc65ce6147793d0a01