折騰人啊!centos7安裝lets enctypt運行不了報openssl的錯誤

報錯信息

  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.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

發佈了11 篇原創文章 · 獲贊 13 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章