I’ve been using Certbot on my Raspberry Pi running emonCMS for over a year without issue. A few days ago I noticed my certificates had failed to renew (usually done with a cron job). I logged into my server and noticed that I can’t run any certbot commands at all. Here’s a typical example:
pi@emonpi(rw):~$ certbot --help
Traceback (most recent call last):
File "/usr/bin/certbot", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 48, in <module>
from pkg_resources.extern import six
ImportError: No module named extern
Here’s another:
pi@emonpi(rw):~$ sudo certbot renew --authenticator standalone --pre-hook "apachectl -k stop" --post-hook "apachectl -k start"
Traceback (most recent call last):
File "/usr/bin/certbot", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 48, in <module>
from pkg_resources.extern import six
ImportError: No module named extern
I tried following the latest instructions for Apache on Jessie, which suggest switching to certbot-auto. Unfortunately I got stopped at this step :
sudo /path/to/certbot-auto --apache
… with this final error message:
Certbot has problem setting up the virtual environment.
We were not be able to guess the right solution from your pip
output.
Consult https://certbot.eff.org/docs/install.html#problems-with-python-virtual-environment
for possible solutions.
You may also find some support resources at https://certbot.eff.org/support/ .
So I reinstalled Certbot the way I had previously done:
sudo apt-get install python-certbot-apache -t jessie-backports
But I get the same result I started with – the seeming dependency errors.
pi@emonpi(rw):~$ certbot --help
Traceback (most recent call last):
File "/usr/bin/certbot", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 48, in <module>
from pkg_resources.extern import six
ImportError: No module named extern