1

When i try to renew my certificates i get following errors Any idea on this ?

[root@ centos]# certbot renew --dry-run

Traceback (most recent call last):
  File "/bin/certbot", line 9, in <module>
    load_entry_point('certbot==0.39.0', 'console_scripts', 'certbot')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.7/site-packages/certbot/main.py", line 17, in <module>
    from certbot import account
  File "/usr/lib/python2.7/site-packages/certbot/account.py", line 17, in <module>
    from acme import messages
  File "/usr/lib/python2.7/site-packages/acme/messages.py", line 11, in <module>
    from acme import challenges
  File "/usr/lib/python2.7/site-packages/acme/challenges.py", line 12, in <module>
    import requests
  File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module>
    from . import utils
  File "/usr/lib/python2.7/site-packages/requests/utils.py", line 32, in <module>
    from .exceptions import InvalidURL
  File "/usr/lib/python2.7/site-packages/requests/exceptions.py", line 10, in <module>
    from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
  File "/usr/lib/python2.7/site-packages/requests/packages/__init__.py", line 95, in load_module
    raise ImportError("No module named '%s'" % (name,))
ImportError: No module named 'requests.packages.urllib3'

Then i try to install the urllib3 but it failed due to following error

[root@ip- centos]# yum install python-urllib3
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirrors.estointernet.in
 * epel: repos.del.extreme-ix.org
 * extras: centos.mirrors.estointernet.in
 * remi-php72: rpms.remirepo.net
 * updates: centos.hbcse.tifr.res.in
Resolving Dependencies
--> Running transaction check
---> Package python-urllib3.noarch 0:1.10.2-7.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================================================
 Package                                        Arch                                   Version                                        Repository                            Size
=================================================================================================================================================================================
Installing:
 python-urllib3                                 noarch                                 1.10.2-7.el7                                   base                                 103 k

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

Total download size: 103 k
Installed size: 380 k
Is this ok [y/d/N]: y
Downloading packages:
python-urllib3-1.10.2-7.el7.noarch.rpm                                                                                                                    | 103 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python-urllib3-1.10.2-7.el7.noarch                                                                                                                            1/1
**Error unpacking rpm package python-urllib3-1.10.2-7.el7.noarch
error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname: cpio: rename
  Verifying  : python-urllib3-1.10.2-7.el7.noarch**                                                                                                                            1/1

**Failed:
  python-urllib3.noarch 0:1.10.2-7.el7**

Complete!

ANY Idea on this fixing this issue ?

mahen3d
  • 4,342
  • 14
  • 36
  • 57

2 Answers2

0

I got the same error while trying to install zsh: i.e. sudo yum update && sudo yum -y install zsh

and I got the following lines:

Loaded plugins: amazon-id, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package python-urllib3.noarch 0:1.10.2-5.el7 will be updated
---> Package python-urllib3.noarch 0:1.10.2-7.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================
 Package                               Arch                          Version                             Repository                                      Size
==============================================================================================================================================================
Updating:
 python-urllib3                        noarch                        1.10.2-7.el7                        rhel-7-server-rhui-rpms                        103 k

Transaction Summary
==============================================================================================================================================================
Upgrade  1 Package

Total download size: 103 k
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for rhel-7-server-rhui-rpms
python-urllib3-1.10.2-7.el7.noarch.rpm                                                                                                 | 103 kB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : python-urllib3-1.10.2-7.el7.noarch                                                                                                         1/2
Error unpacking rpm package python-urllib3-1.10.2-7.el7.noarch
error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname: cpio: rename
  Verifying  : python-urllib3-1.10.2-7.el7.noarch                                                                                                         1/2
python-urllib3-1.10.2-5.el7.noarch was supposed to be removed but is not!
  Verifying  : python-urllib3-1.10.2-5.el7.noarch                                                                                                         2/2

Failed:
  python-urllib3.noarch 0:1.10.2-5.el7                                          python-urllib3.noarch 0:1.10.2-7.el7

To FIX it: Run this command: sudo pip uninstall urllib3

THEN either: run

a. Re-install it: sudo pip install urllib3

or better

b. sudo yum update && sudo yum -y install zsh (which is what I wanted, zsh grabs the latest version as a dependency).

AKS
  • 115
  • 1
  • 8
0

Try to move /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname dir/file and try again. Could be conflict between file and dir.

asktyagi
  • 2,860
  • 2
  • 8
  • 25