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,但是我关掉之后还是不行,所以最后还是修改文件变好了

  • 相关阅读:
    2015长春区域赛感想
    己亥清爽恢复系列之数据文件1篇:SYSTEM物理损坏或丢失(关键表空间)
    ecshop和jQuery冲突
    ecshop广告分析
    ecshop商品页增加编辑器fckeditor
    DIV自适应高度
    打个招呼
    jdk的wsimport方法实现webservice客户端调用服务
    jdk自带发布webservice服务
    Mysql数据库基本配置
  • 原文地址:https://www.cnblogs.com/fyy-hhzzj/p/8340392.html
Copyright © 2011-2022 走看看