Letencrypt failed with ImportError: no interface with module name

I am using Amazon linux, and I followed a few steps to use letencrypt, which is easy to find in a google search, but all of this fails:

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 

What am I doing:

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

What is it. So I tried to fix it, but the dozens of solutions that I found would not work with me.

Most of them said to try:

unset PYTHON_INSTALL_LAYOUT

But still the same error, nothing changes. And someone said like this:

pip install --upprade pip

But after typing this, I can no longer use pip, it did not work with some kind of command that was not found an error, so I recreated my server again.

I also tried using CertBot, but it gives me exactly the same error!

I am using Linux 4.4.51-40.58.amzn1.x86_64 x86_64, you need help. I spent almost one day, but nothing worked.

Every solution I found did not work with me. Any advice would greatly appreciate this.

+5
source share
3 answers

I had the same problem, and after a long downtime, a very simple thing solved this problem on my AWS instance:

  • Move the letencrypt caching files to another folder (given that you run it as root / sudo):

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

  • New letencrypt version downloaded

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

  • Run the letencrypt command to check if it works again:

    sudo ./letsencrypt-auto --debug

While searching for a solution, I also updated pip , which could help. Although my attempts after updating pip did not solve my problem in the same way as clearing the letencnrypt cache folder.

Hope this helps. If not, some links I can provide on the same issue:

+4
source

Removing the certbot directory did the trick for me.

 rm -rf /opt/eff.org/certbot/ wget https://dl.eff.org/certbot-auto chmod a+x certbot-auto sudo ./certbot-auto certonly --standalone -d example.com --no-bootstrap 
+4
source

Part of the question for me was related to some strange default behavior when installing 64-bit packages, but not using python. After getting this problem [it is mostly installed at the moment] run the following

 cd /root/.local/share/letsencrypt \cp -r ./venv/lib64/* ./venv/lib/ 

Then repeat the command. The installation location of the python virtual environment varies with different versions and operating systems, but the general principle helped me debug two different installations.

+1
source

Source: https://habr.com/ru/post/1265323/


All Articles