报错信息
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
错误原因:mirrorlist.centos.org 不再被支持
解决方法:
sudo sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sudo sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo
sudo sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo
Running
yum upgrade -y 如果:
failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://vault.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 301 - Moved Permanently
解决:
sudo echo "sslverify=false" >> /etc/yum.conf
更多信息详见:
mirrorlist.centos.org no longer resolve? - Server Fault
本文转载自: https://blog.csdn.net/utf_8__/article/details/140399521
版权归原作者 utf_8__ 所有, 如有侵权,请联系我们删除。
版权归原作者 utf_8__ 所有, 如有侵权,请联系我们删除。