CentOS 7.6 - yum 更新错误“无法找到存储库的有效基本 URL:addons/7”

CentOS 7.6 - yum 更新错误“无法找到存储库的有效基本 URL:addons/7”

当我尝试这样做时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

对于那些遇到类似问题的人,我通过以下步骤解决了问题。

  1. 前往/etc/sysconfig/network-scripts/ifcfg-enp0s3并更改ONBOOT=yes

  2. 将 http 添加到防火墙firewall-cmd --permanent --zone=public --add-service=http

  3. 重新启动防火墙firewall-cmd --reload

  4. 重新启动网络service network restart

然后问题就消失了。

相关内容