当我尝试这样做时yum update
,我收到以下错误消息。
Loaded plugins: fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch= error was
14: curl#7 - "Failed to connect to 2001:4178:5:200::10: Network is unreachable
Cannot find a valid baseurl for repo: addons/7
我该如何修复它?
答案1
对于那些遇到类似问题的人,我通过以下步骤解决了问题。
前往
/etc/sysconfig/network-scripts/ifcfg-enp0s3
并更改ONBOOT=yes
将 http 添加到防火墙
firewall-cmd --permanent --zone=public --add-service=http
重新启动防火墙
firewall-cmd --reload
重新启动网络
service network restart
然后问题就消失了。