Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Today when i tried to renew my certificates using this command I'm facing error

/opt/letsencrypt/letsencrypt-auto renew --config /etc/letsencrypt/config.ini --agree-tos && apachectl graceful

also tried this command

/opt/letsencrypt/letsencrypt-auto renew

Error :

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 12, 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

I did lot of research no solution found.

like image 446
O-mkar Avatar asked Jul 03 '16 12:07

O-mkar


2 Answers

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

like image 191
O-mkar Avatar answered Sep 17 '22 15:09

O-mkar


sudo pip uninstall zope.interface and reinstall zope.interface

sudo pip install zope.interface

like image 34
baocheng liao Avatar answered Sep 17 '22 15:09

baocheng liao