报错信息
File "/usr/lib/python2.7/site-packages/acme/client.py", line 40, in <module>
urllib3.contrib.pyopenssl.inject_into_urllib3()
AttributeError: 'module' object has no attribute 'pyopenssl'
研究发现基本是pyopenssl的问题
参考https://serverfault.com/questions/830284/certbot-for-letsencrypt-missing-pyopenssl-module
以下方式对我有用
I experienced this same issue twice on 2 separate Centos7 systems in
the last 2 months. This is what worked for me:yum remove pyOpenSSL [This will remove certbot installed via epel] yum
install openssl-devel python-devel [May or may not actually be
necessary] pip install certbot pip install certbot-apache After
completing these steps I was able to successfully renew my
certificates with certbot.
我的解决方式
[root@localhost ~]# sudo yum remove pyOpenSSL
[root@localhost ~]# sudo pip install openssl-devel python-devel
[root@localhost ~]# sudo yum install certbot
[root@localhost ~]# sudo certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
No certs found.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -