Certbot command Error ContextualVersionConflict


#1

I was following this guide: How to stop using TLS-SNI-01 with Certbot
in order to update my ACME client and in the guide it mentions if the version of certbot is below 0.28 than you need to upgrade it with a link to the website: https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx
So essentially I was following this guide to update my certbot and now when I run any Certbot command I get a ContextualVersionConflict and I have no idea what to do.

My domain is: hveachat.com

I ran this command: certbot

It produced this output: ContextualVersionConflict: (pyasn1 0.1.9 (/usr/lib/python2.7/dist-packages), Requirement.parse(‘pyasn1<0.5.0,>=0.4.1’), set([‘pyasn1-modules’]))
Please see the logfile ‘/tmp/tmpV5lI1x’ for more details.

Ubuntu 16.04, nginx.

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): it was 0.17.0


#2

What does /tmp/tmpV5lI1x contain?

That’s not an error message from a recent Certbot package – it uses Python 3 now, not Python 2.7.

What do “which certbot” and “sudo which certbot” show?

Does “sudo apt update” and “sudo apt full-upgrade” upgrade Certbot and other related packages?

What does “dpkg -l '*certbot*' '*pyasn1*'” show?

Edit: Different apt command.


#3

Also, did you ever use pip as root to install or upgrade individual Python packages on this system?


#4

“vi /tmp/tmpPDAzPU” RETURNED:

“which certbot” and “sudo which certbot” RETURNED: /usr/local/bin/certbot

“sudo apt full-upgrade” upgraded 9 packages and installed 5 new ones


#5

“dpkg -l ‘certbot’ ‘pyasn1’” RETURNED:


#6

To Be honest, not sure if python was installed using pip as root, it was set up before I worked on it. The only thing I ever need to do is upgrade certbot.