The error is coming from the Python standard library on your system. I think there is either a problem with the Python installation or the virtual environment used by Certbot.
First, I’d try running sudo rm -rf /opt/eff.org
and running letsencrypt-auto
again.
If you still get the issue, do you get the same ImportError
when you run:
python2 -c 'import weakref'
If so, you should run sudo rm -rf /opt/eff.org
, try reinstalling python
from apt-get
, and running letsencrypt-auto
again.
If not, do you get the error when you run:
cd $(mktemp -d)
virtualenv -p python2 venv
./venv/bin/python -c 'import weakref'
If so, you should also run sudo rm -rf /opt/eff.org
, but try reinstalling the virtualenv
package and running letsencrypt-auto
again.