Letsencrypt证书升级问题

时间:2017-03-13 11:00:16

标签: lets-encrypt

在Ubuntu 16.04.2 LTS上,我试图通过使用升级letsencrypt证书 ./letsencrypt-auto renew --dry-run及其给出以下错误

Error: couldn't get currently installed version for /root/.local/share/letsencrypt/bin/letsencrypt: 
Traceback (most recent call last):
  File "/root/.local/share/letsencrypt/bin/letsencrypt", line 7, in <module>
    from certbot.main import main
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/main.py", line 13, in <module>
    from acme import jose
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/jose/__init__.py", line 37, in <module>
    from acme.jose.interfaces import JSONDeSerializable
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/jose/interfaces.py", line 9, in <module>
    from acme.jose import util
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/acme/jose/util.py", line 4, in <module>
    from cryptography.hazmat.primitives.asymmetric import rsa
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py", line 14, in <module>
    from cryptography.hazmat.backends.interfaces import RSABackend
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/cryptography/hazmat/backends/__init__.py", line 7, in <module>
    import pkg_resources
  File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 36, in <module>
    import plistlib
  File "/usr/lib/python2.7/plistlib.py", line 62, in <module>
    import datetime
ImportError: No module named datetime

你能帮忙吗

3 个答案:

答案 0 :(得分:0)

只做

rm -rf /root/.local/share/letsencrypt/bin/letsencrypt

再试一次。

答案 1 :(得分:0)

我通过删除virtualenv bin目录并重新运行certbot-auto命令解决了这个问题,这将导致certbot重新安装依赖项。要查找目录的位置,请查看错误响应的第一行: Error: couldn't get currently installed version for /root/.local/share/letsencrypt/bin/letsencrypt。这个位置会有所不同。

因此,删除/root/.local/share/letsencrypt/bin/应删除已安装的依赖项并获取证书但已启动并运行。

答案 2 :(得分:0)

这对我有用(Linux Debian 3.16.64-2):

mv /opt/eff.org/certbot /opt/eff.org/certbot.old

certbot-auto