本文介绍了letsencrypt失败,出现ImportError:没有名为接口的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Amazon linux,我按照一些步骤使用了letencrypt,该方法很容易在Google搜索中找到,但所有操作均失败:

I'm using Amazon linux, and I followed some steps for using letsencrypt that easily found in google search, but all it fails with:

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/dist-packages/certbot/main.py", line 11, in <module>
    import zope.component
  File "/root/.local/share/letsencrypt/local/lib/python2.7/dist-packages/zope/component/__init__.py", line 16, in <module>
    from zope.interface import Interface
ImportError: No module named interface

我要做的是:

# git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
# /opt/letsencrypt/letsencrypt-auto --debug

就是这样.因此,我尝试解决此问题,但是我发现很多解决方案都无法解决我的问题.

That's it. So I tried to fix this, but dozens of solution that I found all won't worked to me.

他们中的大多数人都说试试看:

Most of them said try this:

但是仍然出现相同的错误,没有任何变化.有人说这样输入:

But still got same error, nothing changes. And someone said that type this:

但是在键入之后,我不能再使用pip了,它由于某种命令未找到错误而失败,因此我再次重新创建了服务器.

But after typed that, I can't use pip anymore, it failed with some kind of command not found error, so I had recreated my server again.

我也尝试过使用CertBot,但这给了我完全相同的错误!

I also tried to use CertBot, but it gives me exactly same error!

我正在使用Linux 4.4.51-40.58.amzn1.x86_64 x86_64,需要帮助.我花了将近一天的时间,但没有任何进展.

I'm using Linux 4.4.51-40.58.amzn1.x86_64 x86_64, need a help. I spent almost a day, but nothing progressed.

找到的每个解决方案对我来说都不奏效.任何建议都将不胜感激.

Every solution that I was found were not worked to me. Any advice will very appreciate it.

推荐答案

我遇到了同样的问题,经过长时间运行,很简单的事情在我的AWS实例上解决了这个问题:

I had same issue and after a long run, a very simple thing solved this issue on my AWS instance:

  1. 将letencrypt缓存文件移动到另一个文件夹(考虑到您以root/sudo身份运行):

  1. Move the letsencrypt cache files to another folder (considering you run it as root/sudo):

sudo mv /root/.local/share/letsencrypt /root/.local/share/letsencrypt-old

下载了letencrypt的全新版本

Downloaded a brand new version of letsencrypt

git clone https://github.com/letsencrypt/letsencrypt

运行letsencrypt命令以测试其是否再次起作用:

Run the letsencrypt command to test if its working again:

sudo ./letsencrypt-auto --debug

在寻找解决方案期间,我还更新了 pip 可能有所帮助.尽管我在进行pip更新后的尝试无法以与清理letsencnrypt缓存文件夹相同的方式解决我的问题.

During my search for a solution I also updated pip which might have helped. Although my attempts after pip update did not solved my issue in the same way as cleaning up the letsencnrypt cache folder.

我希望这会有所帮助.如果没有,我可以分享一些有关同一问题的链接:

I hope this helps. If not, some links I can share about same issue:

  • certbot zope.interface error
  • no module named interface
  • letsencrypt failed with no module named interface

这篇关于letsencrypt失败,出现ImportError:没有名为接口的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 14:39