Skip to content

Instantly share code, notes, and snippets.

@SarasArya
Last active July 26, 2019 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SarasArya/72c2f35ff9a900fb0cf1c5695a0e3918 to your computer and use it in GitHub Desktop.
Save SarasArya/72c2f35ff9a900fb0cf1c5695a0e3918 to your computer and use it in GitHub Desktop.
This Gist helps anyone solve the issue of pkg version mismatch with certbot. Very helpful when you want to automate the certificate generation packages.

In case you have a requirement to automate the certificate installation without docker and you have installed certificate on Ubuntu Machine 18.04 using.
sudo apt install software-properties-common.
sudo apt update.
sudo add-apt-repository ppa:certbot/certbot.
sudo apt update. sudo apt-get install python-certbot-nginx.
sudo apt install python3-pip.
sudo pip3 install certbot-dns-route53.

Don't do sudo apt install certbot. Because the latest version there doesn't get updated and you will run into this error .

pkg_resources.VersionConflict: (certbot 0.31.0 (/usr/lib/python3/dist-packages), Requirement.parse('certbot>=0.34.0')) Please see the logfile '/tmp/tmp6nwxhyt_' for more details. .

Because pip3 will install the latest version of the certbot and the ubuntu one and python one will clash.
To avoid this. Either don't install or if you have followed the digitalocean guide and you already did. Run sudo apt-get remove certbot . This should fix it.

Finally command is sudo certbot certonly --dns-route53 --dns-route53-propagation-seconds 30 -d *.rylah.in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment