Install certbot on Amazon Linux

Written by Luke Arntz on December 13, 2016

tags:

Contents

INSTALL CERTBOT

(official instructions at certbot.eff.org)

There is no packaged version of certbot for Amazon Linux so we have to download and set it up manually. Running it the first time will install all dependencies and should then work to create and renew certificates. Unfortunately, the first run on Amazon Linux gives us and error instead of a working certbot. :(

To install use wget to download the certbot script and then make the script executable. To avoid erroring out and failing to install dependencies you must run unset PYTHON_INSTALL_LAYOUT before running certbot-auto for the first time. After the initial installation of dependencies certbot-auto can create and renew certificates without having to run the unset PYTHON_INSTALL_LAYOUT command.

To get certbot installed and running on Amazon Linux run the following commands:

wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
unset PYTHON_INSTALL_LAYOUT
./certbot-auto

WHAT HAPPENS IF WE RUN CERTBOT-AUTO WITHOUT unset PYTHON_INSTALL_LAYOUT?

us-east-1c/etc/letsencrypt/certbot> ./certbot-auto
Creating virtual environment...
Installing Python packages...
Installation succeeded.
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

REFERENCES

I found the solution in this github issue.

Related Articles

Top