let’s encrypt, certbot renew证书更新失败

centos 7, let’s encrypt, certbot renew证书更新失败,
提示ImportError: cannot import name UnrewindableBodyError
卸载 python-urllib3重新安装后解决。

File "/usr/bin/certbot", line 9, in
load_entry_point('certbot==0.39.0', 'console_scripts', 'certbot')()
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 2852, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 2443, in load
return self.resolve()
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 2449, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python2.7/site-packages/certbot/main.py", line 17, in
from certbot import account
File "/usr/lib/python2.7/site-packages/certbot/account.py", line 17, in
from acme import messages
File "/usr/lib/python2.7/site-packages/acme/messages.py", line 11, in
from acme import challenges
File "/usr/lib/python2.7/site-packages/acme/challenges.py", line 12, in
import requests
File "/usr/lib/python2.7/site-packages/requests/init.py", line 58, in
from . import utils
File "/usr/lib/python2.7/site-packages/requests/utils.py", line 32, in
from .exceptions import InvalidURL
File "/usr/lib/python2.7/site-packages/requests/exceptions.py", line 10, in
from urllib3.exceptions import HTTPError as BaseHTTPError
File "/usr/lib/python2.7/site-packages/urllib3/init.py", line 10, in
from .connectionpool import (
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 31, in
from .connection import (
File "/usr/lib/python2.7/site-packages/urllib3/connection.py", line 45, in
from .util.ssl_ import (
File "/usr/lib/python2.7/site-packages/urllib3/util/init.py", line 5, in
from .request import make_headers
File "/usr/lib/python2.7/site-packages/urllib3/util/request.py", line 5, in
from ..exceptions import UnrewindableBodyError
ImportError: cannot import name UnrewindableBodyError

sudo pip uninstall requests
sudo pip uninstall urllib3
sudo yum remove python-urllib3
sudo yum remove python-requests #如无必要,先不卸载。因为连带卸载的其他依赖包比较多。
sudo yum install python-urllib3
sudo yum install python-requests

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

Time limit is exhausted. Please reload CAPTCHA.