Centos 下安装 python2-urllib3 失败

Centos 下安装 python2-urllib3 失败

[root@node1 ~]# yum install python2-urllib3
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.cn99.com
 * updates: mirrors.aliyun.com
25 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package python2-urllib3.noarch 0:1.16-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================
 Package                                          Arch                                    Version                                       Repository                                        Size
===============================================================================================================================================================================================
Installing:
 python2-urllib3                                  noarch                                  1.16-1.el7                                    openstack-ocata                                  126 k

Transaction Summary
===============================================================================================================================================================================================
Install  1 Package

Total download size: 126 k
Installed size: 455 k
Is this ok [y/d/N]: y
Downloading packages:
python2-urllib3-1.16-1.el7.noa FAILED                                          
http://mirror.centos.org/centos/7/cloud/x86_64/openstack-ocata/common/python2-urllib3-1.16-1.el7.noarch.rpm: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: Network is unreachable"
Trying other mirror.
python2-urllib3-1.16-1.el7.noa FAILED                                          
http://mirror.centos.org/centos/7/cloud/x86_64/openstack-ocata/common/python2-urllib3-1.16-1.el7.noarch.rpm: [Errno 14] curl#7 - "Failed to connect to 2605:9000:401:102::2: Network is unreachable"
Trying other mirror.
python2-urllib3-1.16-1.el7.noarch.rpm                                                                                                                                   | 126 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python2-urllib3-1.16-1.el7.noarch                                                                                                                                           1/1 
Error unpacking rpm package python2-urllib3-1.16-1.el7.noarch
error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname: cpio: rename
  Verifying  : python2-urllib3-1.16-1.el7.noarch                                                                                                                                           1/1 

Failed:
  python2-urllib3.noarch 0:1.16-1.el7                                                                                                                                                          

Complete!

解决方法:

可能是因为本地已经有的urllib3会和python2-urllib3 的rpm包起冲突,所以先把urllib3卸载了再安装rpm包:

$ sudo pip uninstall urllib3
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值