Let’s Encrypt certbot-auto problems on Amazon Linux

Let’s Encrypt certbot-auto problems on Amazon Linux

Let’s Encryptcertbot-auto support for Amazon Linux is still marked as experimental and as such we occasionally encounter unexpected problems. The most recent one was introduced with certbot-auto 0.19.0. During install or upgrade from previous versions you may get an error like this:

It took me quite a while to figure out that it’s got nothing to do with Zope.

Solution

All that is needed is to run the script with $PYTHON_INSTALL_LAYOUT environment variable unset (or set to empty string).

Unfortunately once the installation or upgrade fails it is necessary to remove the whole installation directory /opt/eff.org/certbot and then re-run with $PYTHON_INSTALL_LAYOUT unset.

Don’t worry about removing /opt/eff.org/certbot – it’s only the code. All the config files are safe under /etc/letsencrypt directory. Unless you remove that you won’t lose any of your configuration 🙂

[Amazon Linux] ~ # PYTHON_INSTALL_LAYOUT="" certbot-auto certonly --webroot -w /srv/vhosts/test.aws.nz -d test.aws.nz
FATAL: Amazon Linux support is very experimental at present...
if you would like to work on improving it, please ensure you have backups
and then run this script again with the --debug flag!
Alternatively, you can install OS dependencies yourself and run this script
again with --no-bootstrap.

Because we removed /opt/eff.org/certbot and it needs to be installed from scratch so we also need to add the --debug option that’s required on Amazon Linux. Now it works: