workswan 2022-05-15 22:55 采纳率: 0%
浏览 180

centos 使用正常的repo yum 报错连接一个很奇怪的网址,貌似是ipv6的

问题遇到的现象和发生背景

版本centos 7.9 网络使用NAT模式 拉了一个同版本系统里面的repo文件还是会报错

问题相关代码,请勿粘贴截图

yum clean all && yum makecache

运行结果及报错内容

已加载插件:fastestmirror
正在清理软件源: base elrepo epel extras updates
Cleaning up list of fastest mirrors
已加载插件:fastestmirror
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrors.elrepo.org/mirrors-elrepo.el7 error was
12: Timeout on http://mirrors.elrepo.org/mirrors-elrepo.el7: (28, 'Connection timed out after 30003 milliseconds')

One of the configured repositories failed (CentOS-7 - Base - mirrors.aliyun.com),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=base ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable base
    or
        subscription-manager repos --disable=base

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=base.skip_if_unavailable=true

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 240e:f7:7c00:106:3::3fe: 网络不可达"
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 240e:f7:7c00:106:3::3fe: 网络不可达"
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 240e:f7:7c00:106:3::3fe: 网络不可达"
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 240e:f7:7c00:106:3::3fd: 网络不可达"
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 240e:f7:7c00:106:3::3fd: 网络不可达"
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 240e:f7:7c00:106:3::3fd: 网络不可达"
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30003 milliseconds')
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30002 milliseconds')
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 240e:f7:7c00:106:3::3fd: 网络不可达"
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 240e:f7:7c00:106:3::3fd: 网络不可达"

我的解答思路和尝试过的方法

拉取了一个正常的使用桥接模式的系统内部的yum源

我想要达到的结果

yum源可用

  • 写回答

3条回答 默认 最新

  • 萧楚鹤 2022-05-15 23:50
    关注

    试试这个
    vi /etc /resolve.conf
    nameserver 8.8.8.8

    评论

报告相同问题?

问题事件

  • 创建了问题 5月15日

悬赏问题

  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误
  • ¥30 最小化遗憾贪心算法上界
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。