使用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 ...
随机推荐
- 在windows平臺下使用cygwin獲取root用戶權限
最近在使用cygwin時發現一個問題,當我要使用root用戶權限時,竟然創建不了root賬戶.最後在網上找了下後,暫時衹找到了通過更改當前用戶權限獲得root權限的方法,具體如下: 实际环境:win1 ...
- Javascript 中的神器——Promise
Promise in js 回调函数真正的问题在于他剥夺了我们使用 return 和 throw 这些关键字的能力.而 Promise 很好地解决了这一切. 2015 年 6 月,ECMAScript ...
- 如何用BarTender批量打印标签
关于使用BarTender条码打印软件打印标签,很多小伙伴最关心的问题之一,莫过于如何实现BarTender批量打印标签.为了提高日常标签打印速度,为了方便快捷,也为了减少出错率,快来跟小编学习学习吧 ...
- IDEA使用maven中tomcat插件启动项目乱码问题
今天用IDEA来启动项目,使用的是maven中的tomcat7插件,正常启动后,再页面操作新增或修改数据时,发生了诡异的事, 中文保存后全部乱码...顿时不淡定了,接着就开始排查原因 首先检查IDEA ...
- C#对象克隆介绍
浅拷贝和深拷贝 有两种对象克隆的方法:浅拷贝和深拷贝.浅拷贝只是复制引用,而不会复制引用的对象.深拷贝会复制引用的对象. 因此,原始对象中的引用和浅拷贝对象中的同一个引用都指向同一个对象.而深拷贝的对 ...
- Java Junit单元测试
使用Junit进行单元测试,首先引入Junit的jar,配置如下. @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(&quo ...
- winform 异步添加文本提示
后台代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data ...
- 待研究:insert客商账户触发器增加条件提示为空
增加客商时候重名不给保存,增加修改条件提示找不到
- pip/easy_install failure: failed to create process
使用pip install requests安装requests, 报错: failed to create process 解决方法: 执行Python -m pip install --upgra ...
- Linux常见命令
du -sh 查看当前文件夹大小 tail -f /var/log/nginx/access.log 查看日志 vsFTPd Linux上面的ftp df -lh 查看磁盘 df -i 查看inode ...