태그 보관물: centos7

centos7

pyopenssl 모듈이 누락 된 letsencrypt에 대한 certbot 발생합니다. [root@li86-193 frappe-bench]#certbot certonly –manual Traceback (most recent call

LetsEncrypt에 대한 CertBot 설정에 도움이 필요합니다

Python 2.7을 사용하여 CentOS 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

도와주세요

감사합니다



답변

CentOS / RHEL 시스템에 certbot을 수동으로 설치하지 마십시오. 그것은 단지 큰 혼란을 만듭니다. 대신 EPEL에서 설치하십시오.

yum install epel-release
yum install certbot


답변

지난 2 개월 동안 2 개의 별도 Centos7 시스템에서 동일한 문제가 두 번 발생했습니다. 이것이 나를 위해 일한 것입니다.

  • yum remove pyOpenSSL [epel을 통해 설치된 certbot을 제거합니다]
  • yum install openssl-devel python-devel [실제로 필요할 수도 있고 아닐 수도 있습니다]
  • 핍 설치 certbot
  • pip install certbot-apache

이 단계를 완료 한 후 certbot으로 인증서를 성공적으로 갱신 할 수있었습니다.


답변

같은 문제가 발생합니다. python venv를 사용하여 pip를 사용하여 certbot을 작동시킬 수있었습니다.

단계 : virtualenv 설치

pip install virtualenv --upgrade

virtualenv 생성

virtualenv -p /usr/bin/python2.7 certbot

certbotvirtualenv를 활성화하십시오

. /root/certbot/bin/activate

프롬프트가 다음과 같이 바뀔 수 있습니다

(certbot) [root@hostname ~]#

그런 다음 pip install certbot

pip install certbot

완료되면 virtualenv에서 certbot명령을 테스트 할 수 certbot있지만 cron을 사용하여 certbot 갱신을 설정하려는 경우에는 실용적이지 않습니다. 가상 환경을 비활성화하고

(certbot) [root@hostname ~]# deactivate

이제 certbot 명령을

/root/certbot/bin/certbot


답변

이것은 나를 위해 일하는 것 같습니다.

여기에서 rpm을 얻으십시오 :
http://rpm.pbone.net/index.php3/stat/4/idpl/31446026/dir/centos_7/com/pyOpenSSL-0.15.1-1.el7.noarch.rpm.html

wget ftp://ftp.muug.mb.ca/mirror/centos/7.2.1511/cloud/x86_64/openstack-mitaka/common/pyOpenSSL-0.15.1-1.el7.noarch.rpm
sudo rpm -Uvh pyOpenSSL-0.15.1-1.el7.noarch.rpm
sudo yum install certbot


답변

올바른 수정 사항은 다음과 같습니다.

mv /usr/lib64/python2.7/site-packages/OpenSSL /usr/lib64/python2.7/site-packages/pyOpenSSL

cnritng frim github에게 감사합니다.


답변

yum설치된 패키지를 통해 패키지를 혼합하지 마십시오 pip. 올바른 수정은 pip 패키지를 제거하고에서 모든 것을 설치하는 것입니다 yum. 여기에 설명했습니다 .

certbot을 실행하기 위해 CentOS 7에서 최신 pyOpenSSL이 필요하지 않습니다!

pip uninstall requests
yum reinstall python-requests

pip uninstall six
yum reinstall python-six

pip uninstall urllib3
yum reinstall python-urllib3


답변

0.9.3에서도 같은 문제가있었습니다. nginx 플러그인 설치로 인해 발생했습니다.

작업중인 설치를 쉽게 재현 할 수 있습니다.

docker run -it –rm centos : centos7 bash yum -y 설치 epel-release yum -y 설치 certbot certbot -h