使用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 ...
随机推荐
- [课程设计]Scrum 1.4 多鱼点餐系统开发进度
Scrum 1.4 多鱼点餐系统开发进度 (点餐页面框架布置) 1.团队名称:重案组 2.团队目标:长期经营,积累客户充分准备,伺机而行 3.团队口号:矢志不渝,追求完美 4.团队选题:餐厅到店点餐系 ...
- WebAPI学习点滴(二)
刚开始学习WebApi就遇到了问题,在同一个API控制器中,如果两个方法的签名相同,比如 [HttpGet] public string GetString() { return "Hell ...
- Android 启动模式及常用的Intent的Flag
LaunchMode 在声明Activity的xml中指定 android:launchMode="xxx" standard 标准模式.这是系统默认的模式,每次启动Activit ...
- nginx 反向代理TCP mysql
stream {upstream mysql { hash $remote_addr consistent; server 10.26.112.12:3306 max_fails=3 fail_tim ...
- JMeter基础之一 一个简单的性能测试
JMeter基础之一 一个简单的性能测试 上一节中,我们了解了jmeter的一此主要元件,那么这些元件如何使用到性能测试中呢.这一节创建一个简单的测试计划来使用这些元件.该计划对应的测试需求. 1)测 ...
- 单例实现c++
#include <iostream> using namespace std; class Singleton { public: static Singleton *GetInstan ...
- 扩展AuthorizeAttribute
MVC中经常会用到关于设置访问权限的问题: 如果我们扩展了AuthorizeAttribute,那么我们只需要在类或方法前加上此attribute,即可实现权限问题. AttributeTargets ...
- phpmyadmin的root密码忘记了怎么办?
管理mysql数据库的工具有网页版的phpmyadmin(开源),也有诸如客户端Navicat for MySQL(商业). 好多环境集成包,比如XAMPP.WampServer等集成了phpmyad ...
- MySQL绿色版的安装(mysql-5.6.22-win32.zip)
1.数据库下载 Mysql官方网站:http://www.mysql.com/,数据库下载地址:http://www.mysql.com/downloads/.从官方网站可以找到两种文件包,一种是ex ...
- animated js动画示例
function fabtn(a){ $(a).find('i').addClass('animated wobble'); setTimeout(function(){ $(a).find('i') ...