Letsencrypt Importerror: No Module Named Interface on Amazon Linux While Renewing

Letsencrypt ImportError: No module named interface on amazon linux while renewing

After doing lots of research I found it.

You have to unset Python install layout

 unset PYTHON_INSTALL_LAYOUT

then update letsencrypt

 /opt/letsencrypt/letsencrypt-auto -v

for more refer this blog https://o-mkar.com/facing-problem-while-renewing-letsencrypt-certificates-importerror-no-module-named-interface-amazon-linux

letsencrypt failed with ImportError: No module named interface

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

  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

  2. Downloaded a brand new version of letsencrypt

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

  3. Run the letsencrypt command to test if its working again:

    sudo ./letsencrypt-auto --debug

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

Let's Encrypt no interface issue

I hit exactly this issue just now with Amazon Linux. The fix that worked for me is 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

I did not have pip installed separately on the server, it was only available as part of the certbot install, so this was the only way I could use pip to upgrade the installation properly.



Related Topics



Leave a reply



Submit