使用yum安装应用程序时候,报错:[Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:8000:6023::230: 网络不可达"
使用yum安装应用程序时候,报错:[Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:8000:6023::230: 网络不可达"
1、系统环境
- 物理机:
Windows 7(32位)
旗舰版 - 虚拟机:
CentOS 6.5
2、问题描述
从安装好系统之后,用yum
源安装软件,一直可以用,今天突然就报了如下的错误,yum
也无法使用了:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.cqu.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
http://mirrors.cqu.edu.cn/CentOS/6.8/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
Trying other mirror.
http://mirror.bit.edu.cn/centos/6.8/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:204:2001:250:56ff:fea1:22: 网络不可达"
Trying other mirror.
http://mirror.lzu.edu.cn/centos/6.8/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:c000::160: 网络不可达"
Trying other mirror.
http://mirrors.nwsuaf.edu.cn/centos/6.8/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
Trying other mirror.
http://mirrors.neusoft.edu.cn/centos/6.8/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:a807::25: 网络不可达"
Trying other mirror.
http://ftp.sjtu.edu.cn/centos/6.8/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:8000:6023::230: 网络不可达"
Trying other mirror.
http://centos.ustc.edu.cn/centos/6.8/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:d800:95::102: 网络不可达"
Trying other mirror.
http://mirrors.aliyun.com/centos/6.8/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
Trying other mirror.
http://mirrors.163.com/centos/6.8/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
Trying other mirror.
http://mirrors.yun-idc.com/centos/6.8/os/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
Trying other mirror.
http://mirrors.aliyun.com/epel/6/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
Trying other mirror.
http://mirrors.tuna.tsinghua.edu.cn/centos/6.8/extras/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2402:f000:1:416:166:111:206:178: 网络不可达"
Trying other mirror.
http://mirrors.cqu.edu.cn/CentOS/6.8/extras/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
Trying other mirror.
http://mirror.bit.edu.cn/centos/6.8/extras/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:204:2001:250:56ff:fea1:22: 网络不可达"
Trying other mirror.
http://mirror.lzu.edu.cn/centos/6.8/extras/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:c000::160: 网络不可达"
Trying other mirror.
http://mirrors.nwsuaf.edu.cn/centos/6.8/extras/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
Trying other mirror.
http://mirrors.zju.edu.cn/centos/6.8/extras/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:e000:1410:216:3eff:fe75:6c73: 网络不可达"
Trying other mirror.
3、解决方法
3.1原因
我们来查看一下,当前用来上网的网卡eth1
的信息:
[root@promote ~]# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:0C:29:D4:EA:E2
inet addr:192.168.1.115 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fed4:eae2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4599 errors:0 dropped:0 overruns:0 frame:0
TX packets:2628 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:575396 (561.9 KiB) TX bytes:278925 (272.3 KiB)
Interrupt:19 Base address:0x2000
我们清楚地看见了inet6 addr: fe80::20c:29ff:fed4:eae2/64 Scope:Link
,这一行信息,这个正是影响我们使用yum
的罪魁祸首!!!下面我们就来关闭网卡的IPV6
。
3.2临时解决方法
临时关闭网卡的IPV6
,并重启网络服务:
[root@promote ~]# echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
[root@promote ~]# echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
[root@promote ~]# service network restart
正在关闭接口 eth1: [确定]
关闭环回接口: [确定]
弹出环回接口: [确定]
弹出界面 eth1:
正在决定 eth1 的 IP 信息...完成。
[确定]
此时,再查看网卡eth1
的信息:
[root@promote ~]# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:0C:29:D4:EA:E2
inet addr:192.168.1.115 Bcast:255.255.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5563 errors:0 dropped:0 overruns:0 frame:0
TX packets:3388 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:676945 (661.0 KiB) TX bytes:414358 (404.6 KiB)
Interrupt:19 Base address:0x2000
没错,我们发现inet6 addr: fe80::20c:29ff:fed4:eae2/64 Scope:Link
这一行信息没有了,此时yum
就可以正常使用了;
3.3永久生效方法
需要在文件/etc/sysctl.conf
中,添加如下的内容:
#shutdown IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
4、结语
至此,我们已经解决了这次遇到的问题,能够继续通过yum
便捷地安装卸载应用程序了。
使用yum安装应用程序时候,报错:[Errno 14] PYCURL ERROR 7 - "Failed to connect to 2001:da8:8000:6023::230: 网络不可达"的更多相关文章
- 通过本地yum源安装软件报错[Errno 14] PYCURL ERROR 56 - "Failure when receiving data from the peer"
通过本地yum源安装软件报错 http://192.168.3.85/centos/6/os/x86_64/Packages/php-pdo-5.3.3-47.el6.x86_64.rpm: [Err ...
- 安装docker报错:https://download.docker.com/linux/centos/7/i386/stable/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
如题,执行docker安装命令报错: [root@centos ~]# yum install docker-ce Loaded plugins: fastestmirror, security Se ...
- yum异常: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
http://people.centos.org/hughesjr/chromium/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 ...
- Appium-desktop安装启用Inspector一直报错An unknown server-side error occurred...
遇到的问题是: 启用Appium-desktop的Inspector一直报错:An unknown server-side error occurred while processing the co ...
- yum install 报错[Errno 14] curl#37 - Couldn't open file /mnt/repodata/repomd.xml
最近在玩centos7,之前装系统没太注意yum这个东东,今天用别人装好的系统想用yum install 一个东西,结果报各种错,所以就是: 1.然后按照网上的一些修改,先是执行: yum cleam ...
- yum install 报错[Errno 14] curl#37 - Couldn't open file /mnt/repodata/repomd.xml
1.然后按照网上的一些修改,先是执行: yum cleam all 然后 yum makecache,问题还是没解决,继续报错. 其实这两条命令就是清空缓存,然后再重新缓存的意思,有时候可能有效. 2 ...
- Git 拉取Gitee仓库报错:“fatal: unable to access ''": Failed to connect to 127.0.0.1 port 1080: Connection refused”
1.报错信息: 2.本地查看是否Git使用了代理 git config --global http.proxy 3.取消代理 git config --global --unset http.prox ...
- ubuntu下安装pip install mysqlclient 报错 command "python setup.py egg_info" failed with error.....解决方案
我的环境: ubuntu 1604 版本, 在黑屏终端已经安装了django和virtualenv虚拟环境, 在创建了django的models后开始迁移的操作, 出现错误, 错误代码最后如题目 可以 ...
- CentOS系统yum源配置修改、yum安装软件包源码包出错解决办法apt.sw.be couldn't connect to host
yum安装包时报错: Could not retrieve mirrorlist http://mirrorlist.repoforge.org/el6/mirrors-rpmforge error ...
随机推荐
- IIs安装&发布&解决遇到的问题
IIS安装: IIS发布: 1.添加网站: 2.将发布的文件,copy到该网站的目录下 3. 刷新,文件显示出来,将其"转换为应用程序” => 4.在应用程序池中找到该网站相应的程序池 ...
- linux操作
进入root权限:sudo su 把文件b的拥有者改成a:chown a b 如果保存文件的时候出现"无法创建备份文件",是因为这个文件所在的文件夹不属于当前用户,需要把这个文件所 ...
- iOS_Swift初识之使用三种回调方式自定义Button
最近在学习Swift ,发现青玉伏案大神早期用OC写的一篇博客--IOS开发之自定义Button(集成三种回调模式) 很适合用来熟悉Swift的回调方式,于是我就用Swift翻版了一下,具体实现原理 ...
- OpenGL法向量变换
OpenGL光照开启时,法向量用于决定特定顶点或面上接受到光照的多少.光照处理过程作用于观察坐标空间,因此,模型对象坐标系的法向量也需要使用GL_MODELVIEW矩阵变换到观察坐标系. 然而,法向量 ...
- day26 分布式监控系统开发
本节内容 为什么要做监控? 常用监控系统设计讨论 监控系统架构设计 监控表结构设计 为什么要做监控? –熟悉IT监控系统的设计原理 –开发一个简版的类Zabbix监控系统 –掌握自动化开发项目的程序设 ...
- virtual file system (VFS)
http://www.ibm.com/developerworks/library/l-virtual-filesystem-switch/ http://www.ibm.com/developerw ...
- 【转载】 Java 7之基础 - 强引用、弱引用、软引用、虚引用
原文地址:http://blog.csdn.net/mazhimazh/article/details/19752475 1.强引用(StrongReference) 强引用是使用最普遍的引用.如果一 ...
- 获取广告标识符ifad
#import <AdSupport/ASIdentifierManager.h> NSString *adId =[[[ASIdentifierManager sharedManager ...
- javascript工具函数
第一部分 JavaScript工具函数 转义特殊字符为html实体 HtmlEncode: function(str){ return str.replace(/&/g, '&') ...
- NAT 网络地址转换
NAT 网络地址转换(Network Address Translation) NAT(Network Address Translation,网络地址转换)是1994年提出的. 属接入广域网(WA ...