certbot forletsencrypt 缺少 pyopenssl 模块

cs3*_*378 10 centos7 certbot

我需要帮助为 LetsEncrypt 设置 CertBot

我在 CentOS 7 上运行 Python 2.7

当我运行 certbot 时,出现以下错误:

[root@li86-193 frappe-bench]#certbot certonly --manual

Traceback (most recent call last):
  File "/usr/bin/certbot", line 7, in <module>
    from certbot.main import main
  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 10, in <module>
    from acme import client as acme_client
  File "/usr/lib/python2.7/site-packages/acme/client.py", line 31, in <module>
    requests.packages.urllib3.contrib.pyopenssl.inject_into_urllib3()
  File "/usr/lib/python2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 112, in inject_into_urllib3
    _validate_dependencies_met()
  File "/usr/lib/python2.7/site-packages/requests/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.

[root@li86-193 frappe-bench]# pip show certbot
Name: certbot
Version: 0.11.1
Summary: ACME client
Home-page: https://github.com/letsencrypt/letsencrypt
Author: Certbot Project
Author-email: client-dev@letsencrypt.org
License: Apache License 2.0
Location: /usr/lib/python2.7/site-packages
Requires: ConfigArgParse, configobj, zope.component, pytz, setuptools, cryptography, zope.interface, pyrfc3339, mock, parsedatetime, six, acme, PyOpenSSL

[root@li86-193 frappe-bench]# pip show pyopenssl
Name: pyOpenSSL
Version: 16.2.0
Summary: Python wrapper module around the OpenSSL library
Home-page: https://pyopenssl.readthedocs.io/
Author: Hynek Schlawack
Author-email: hs@ox.cx
License: Apache License, Version 2.0
Location: /usr/lib/python2.7/site-packages
Requires: six, cryptography
Run Code Online (Sandbox Code Playgroud)

请帮忙

谢谢

Mic*_*ton 7

不要尝试在 CentOS/RHEL 系统上手动安装 certbot。它只会造成巨大的混乱。相反,从 EPEL 安装它。

yum install epel-release
yum install certbot
Run Code Online (Sandbox Code Playgroud)

  • 我运行了 EPEL certbot 包并解决了这个问题。我系统上的其他内容已将“请求”库更新为最新版本(撰写本文时为 2.13.0),但作为 certbot 依赖项安装的 RPM 为 2.6.0。比较`pip list 2&gt;/dev/null 的版本| grep requests` 和 `rpm -q python-requests --queryformat '%{VERSION}\n'`。如果它们不同,请尝试`pip install --upgrade --force-reinstall 'requests==2.6.0'`。 (8认同)