无法运行 yum update。它因消息连接被拒绝而失败。
当我运行 sudo yum update 时,我收到以下消息
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=genclo error was
14: curl#7 - "Failed connect to localhost:3000; Connection refused"
我可以连接到互联网。
这是我的解决方案。
在下一个站点上找到合适的版本(在本例中我使用的是 7.0.1406):
执行下一个命令来更新您的 yum 配置文件:
sed -i -e 's/mirrorlist=/#mirrorlist=/g' /etc/yum.repos.d/CentOS-*
sed -i -e 's/mirrorlist=/#mirrorlist=/g' /etc/yum.conf
sed -E -i -e 's/#baseurl=http:\/\/mirror.centos.org\/centos\/\$releasever\/([[:alnum:]_-]*)\/\ $basearch\//baseurl=https:\/\/vault.centos.org\/7.0.1406\/ \/\$basearch\//g' /etc/yum.repos.d/CentOS-*
sed -E -i -e 's/#baseurl=http:\/\/mirror.centos.org\/centos\/\$releasever\/([[:alnum:]_-]*)\/\ $basearch\//baseurl=https:\/\/vault.centos.org\/7.0.1406\/ \/\$basearch\//g' /etc/yum.conf
祝你好运!