4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

certbotでpyOpenSSL ImportError

Last updated at Posted at 2018-08-10

いつだかの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

4
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?