zoukankan      html  css  js  c++  java
  • centos7.4 yum安装包出现网络不可达跟Recv failure: Connection reset by peer" 这个问题

    [root@controller ~]# yum repolist
    已加载插件:fastestmirror
    Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
    14: curl#56 - "Recv failure: Connection reset by peer"
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    http://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: 网络不可达"
    正在尝试其它镜像。
    ^Chttp://mirror.centos.org/centos/7/storage/x86_64/ceph-jewel/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
    正在尝试其它镜像。
    ^Chttp://mirror.centos.org/centos/7/cloud/x86_64/openstack-pike/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
    正在尝试其它镜像。
    ^Chttp://mirror.centos.org/centos/7/virt/x86_64/kvm-common/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
    正在尝试其它镜像。
    ^CCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock error was
    14: curl#56 - "Callback aborted"
    ^CCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates&infra=stock error was
    14: curl#56 - "Callback aborted"
    源标识 源名称

    因为之前修改了网卡的文件,之前的网卡配置信息如下

    [root@compute1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

    TYPE=Ethernet
    BOOTPROTO=static
    DEFROUTE=yes
    NAME=enp0s3
    UUID=28bff50c-ed5e-403d-9954-34021967359e
    DEVICE=enp0s3
    ONBOOT=yes
    IPADDR=192.168.1.100
    PREFIX=24
    GATEWAY=192.168.1.1

    修改之后的就变成

    [root@compute1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3

    TYPE=Ethernet
    BOOTPROTO=static
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_FAILURE_FATAL=no
    IPV6_ADDR_GEN_MODE=stable-privacy
    NAME=enp0s3
    UUID=28bff50c-ed5e-403d-9954-34021967359e
    DEVICE=enp0s3
    ONBOOT=yes
    IPADDR=192.168.1.100
    PREFIX=24
    GATEWAY=192.168.1.1

    :wq

    yum clean all ;yum repolist  

    Recv failure: Connection reset by peer"  这个问题网上的解决办法是关掉selinux跟firewalld,但是我关掉之后还是不行,所以最后还是修改文件变好了

  • 相关阅读:
    题解 AT5228 【[ABC162A] Lucky 7】
    题解 P6467 【[COCI2008-2009#6] BUKA】
    2020 Codeforces 愚人节比赛题解 A~D
    题解 AT4251 【[ABC110A] Maximize the Formula】
    题解 AT5638 【November 30】
    题解 AT4164 【[ABC102A] Multiple of 2 and N】
    多项式全家桶
    烂题推荐
    NOIP 2020 游记
    P5048 题解
  • 原文地址:https://www.cnblogs.com/fyy-hhzzj/p/8340392.html
Copyright © 2011-2022 走看看