Centos 下安装 python2-urllib3 失败
[root@node1 ~]@H_301_4@# yum install python2-urllib3
Loaded plugins: fastestmirror,priorities
Loading mirror speeds from cached hostfile
* base: mirrors@H_301_4@.aliyun@H_301_4@.com
* epel: mirrors@H_301_4@.ustc@H_301_4@.edu@H_301_4@.cn
* extras: mirrors@H_301_4@.cn99@H_301_4@.com
* updates: mirrors@H_301_4@.aliyun@H_301_4@.com
25 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package python2-urllib3@H_301_4@.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@H_301_4@.noa Failed
http://mirror@H_301_4@.centos@H_301_4@.org/centos/7/cloud/x86_64/openstack-ocata/common/python2-urllib3-1.16-1.el7@H_301_4@.noarch@H_301_4@.rpm: [Errno 14] curl@H_301_4@#7 - "Failed to connect to 2605:9000:401:102::2: Network is unreachable"
Trying other mirror.
python2-urllib3-1.16-1.el7@H_301_4@.noa Failed
http://mirror@H_301_4@.centos@H_301_4@.org/centos/7/cloud/x86_64/openstack-ocata/common/python2-urllib3-1.16-1.el7@H_301_4@.noarch@H_301_4@.rpm: [Errno 14] curl@H_301_4@#7 - "Failed to connect to 2605:9000:401:102::2: Network is unreachable"
Trying other mirror.
python2-urllib3-1.16-1.el7@H_301_4@.noarch@H_301_4@.rpm | 126 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python2-urllib3-1.16-1.el7@H_301_4@.noarch 1/1
Error unpacking rpm package python2-urllib3-1.16-1.el7@H_301_4@.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@H_301_4@.noarch 1/1
Failed:
python2-urllib3@H_301_4@.noarch 0:1.16-1.el7
Complete!
解决方法:
可能是因为本地已经有的urllib3会和python2-urllib3 的rpm包起冲突,所以先把urllib3卸载了再安装rpm包:
$ sudo pip uninstall urllib3