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
}
BOOTSTRAP_VERSION=”BootstrapRpmCommon $BOOTSTRAP_RPM_COMMON_VERSION”
elif [ -f /etc/product ] && grep -q “Joyent Instance” /etc/product ; then
Bootstrap() {
ExperimentalBootstrap “Joyent SmartOS Zone” BootstrapSmartOS
}
BOOTSTRAP_VERSION=”BootstrapSmartOS $BOOTSTRAP_SMARTOS_VERSION”
else
Bootstrap() {
error “Sorry, I don’t know how to bootstrap Certbot on your operating system!”
error
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
}
fi

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
\S
Kernel \r on an \m

After editing, added Amazon Linux 2:

[ec2-user@linuxbyimraan ~]$ cat /etc/issue
\S
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…!!!!

Leave a Reply

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