いつだかのyum updateで以下のエラーを吐いて動かなくなった。
Traceback (most recent call last):
File "/bin/certbot", line 9, in <module>
load_entry_point('certbot==0.26.1', '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 21, in <module>
from certbot import client
File "/usr/lib/python2.7/site-packages/certbot/client.py", line 16, in <module>
from acme import client as acme_client
File "/usr/lib/python2.7/site-packages/acme/client.py", line 36, in <module>
requests.packages.urllib3.contrib.pyopenssl.inject_into_urllib3() # type: ignore
File "/usr/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py", line 112, in inject_into_urllib3
_validate_dependencies_met()
File "/usr/lib/python2.7/site-packages/urllib3/contrib/pyopenssl.py", line 147, in _validate_dependencies_met
raise ImportError("'pyOpenSSL' module missing required functionality. "
ImportError: 'pyOpenSSL' module missing required functionality. Try upgrading to v0.14 or newer.
最終行でググるとpipで入れてるパッケージとyumでいれてるパッケージで
バージョンに差異があるためっぽい。
pipで入ってるパッケージをアップグレードする。
↓↓↓↓↓↓↓ あなたの記事の内容
$ pip uninstall requests
$ yum reinstall python-requests-toolbelt
$ pip uninstall six
$ yum reinstall python-six
$ pip uninstall urllib3
$ yum reinstall python-urllib3
───────
$ pip install --upgrade pip
$ pip install requests --ignore-installed
$ pip install --upgrade --force-reinstall 'requests==2.6.0'
↑↑↑↑↑↑↑ 編集リクエストの内容
参考URL
https://github.com/certbot/certbot/issues/5534#issuecomment-364549029