Error on certbot Linux (Ubuntu)

grrrrr....

Uninstall the snap version of certbot and reinstall it.

3 Likes

Did not work :frowning:

I suppose you misunderstood me.

Please undo this apt install of certbot:
image
[and don't install it again - ever - LOL]

Then... focusing only on the snap version of certbot:

  • uninstall it
  • reinstall it
2 Likes

Also... Show:
sudo apt list | grep installed | grep -E 'python|certbot'
sudo snap list

3 Likes

I don't know if I did it correctly, I'm still a newbie, they're still learning

Do:
sudo apt remove python3-certbot
sudo apt autoremove

3 Likes

Is correct?

looks better

Try again:
certbot --version
/snap/certbot/current/bin/certbot --nginx -d mail.gamerocorporation.com

2 Likes

I'm not sure what's wrong with certbot on your system, but if you want a workaround, you can use acme.sh instead of certbot, it does not use python. Works for me on older system where certbot didn't work.

2 Likes

Okay, but can you tell me how it works?

There already is plenty of documentation for acme.sh.

2 Likes

Ok, but the idea was to get certbot working again because I don't know if acme.sh works as it needs to work

Did you do that?

1 Like

yes

I guess there is something wrong with python on your system. Installing certbot should have automatically installed all the necessary dependencies, but it seems you have already tried reinstalling cerbot both from apt and snap. Maybe there is some kind of version conflict between python2 and python3.

Maybe try removing it all -

sudo apt remove certbot*
sudo snap remove certbot
sudo apt remove python3-certbot
sudo rm /usr/local/bin/certbot

Then reinstall it again.

You can also try

sudo update-alternatives --config python3
2 Likes

what error is this?

Another thing you can try is the pip instructions; to use a separate virtual environment just for certbot.

Not sure if your python installation is working well enough for that either, though.

If it were me I'd give up on detangling weird python environments, and use some other client. Someone else here recommended acme.sh since it's just copy-over-and-run without worrying about dependencies. Another popular option in that vein is lego, as you can similarly just download the binary for your platform and run it.

3 Likes