让我们加密没有接口问题

Let's Encrypt no interface issue

我在 AWS Ec2 Amazon Linux 上并尝试使用 Let's Encrypt。当我几个月前第一次安装 Let's Encrypt 时,我在更新证书时没有遇到任何问题。但是现在我收到这个错误并且无法续订。

# ./certbot-auto --debug
Error: couldn't get currently installed version for /opt/eff.org/certbot/venv/bin/letsencrypt: 
Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 7, in <module>
    from certbot.main import main
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/main.py", line 7, in <module>
    import zope.component
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/zope/component/__init__.py", line 16, in <module>
    from zope.interface import Interface
ImportError: No module named interface

我已经尝试取消设置 PYTHON_INSTALL_LAYOUT 并升级 pip、virtualenv。运气不好。

这个问题好像很相似但是目录不一样。不确定我要 rm /opt/eff.org/certbot/venv/bin/letsencrypt

我刚刚在亚马逊 Linux 遇到了这个问题。对我有用的修复是 detailed on the certbot GitHub issue

I had the same issue from what appears to be a bad install of certbot. I fixed it by running the following:

unset PYTHON_INSTALL_LAYOUT
/root/.local/share/letsencrypt/bin/pip install --upgrade certbot

我没有在服务器上单独安装 pip,它仅作为 certbot 安装的一部分提供,所以这是我可以使用 pip 正确升级安装的唯一方法。

我解决了这个问题:

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

sudo rm -rf /opt/eff.org/certbot/

然后在用户模式 ​​(ec2-user) 下重新运行 certbot-auto。

./certbot-auto renew -v --debug

如果您像我一样在您的 EC2 实例上安装了 pip,您可以简单地这样做:

rm -rf /opt/eff.org/*
pip install -U certbot
certbot renew --debug

通过wget下载certbot-auto一直对我造成问题,所以首选上述方法。