Warning: Use of undefined constant HTTP_USER_AGENT - assumed 'HTTP_USER_AGENT' (this will throw an Error in a future version of PHP) in /var/www/html/linuxbyimraan.co.za/wp-content/themes/voice-blog/header.php on line 1
Issue installing Cerbot on Amazon Linux 2 – LinuxByImraan

Issue installing Cerbot on Amazon Linux 2

Okay, so I have been experiencing an issue for a while in which I was unable to install certbot on Amazon Linux 2 which was suprising seeing as the documentation sez its possible. When attempting to install certbot, I get the following error:

“Sorry, I don’t know how to bootstrap Certbot on your operating system!”

Reviewing the source code of the cerbot script, it shows that it only supports Amazon Linux and not Amazon Linux 2:

elif [ -f /etc/issue ] && grep -iq “Amazon Linux” /etc/issue ; then
Bootstrap() {
ExperimentalBootstrap “Amazon Linux” BootstrapRpmCommon
elif [ -f /etc/product ] && grep -q “Joyent Instance” /etc/product ; then
Bootstrap() {
ExperimentalBootstrap “Joyent SmartOS Zone” BootstrapSmartOS
Bootstrap() {
error “Sorry, I don’t know how to bootstrap Certbot on your operating system!”
error “You will need to install OS dependencies, configure virtualenv, and run pip install manually.”
error “Please see https://letsencrypt.readthedocs.org/en/latest/contributing.html#prerequisites”
error “for more info.”
exit 1

After googling and googling and trying all the recommended work arounds, nothing worked for me. Until a friend of mine told me to try the following:

Edit the /etc/issue file:

Before editing:

[ec2-user@linuxbyimraan ~]$ cat /etc/issue
Kernel \r on an \m

After editing, added Amazon Linux 2:

[ec2-user@linuxbyimraan ~]$ cat /etc/issue
Kernel \r on an \m
Amazon Linux 2

Next, I attempted running cerbot, however this time it gave a different error. However, after running the script with the –Debug option, to my surprise, the script installed without any issues allowing me to install SSL using certbot.

Thanks for the help Tulio…!!!!

No token or token has expired.

Leave a Reply

Your email address will not be published. Required fields are marked *