Certbot is broken and out of date

I see - the only thing requiering python is certbot.

Another way of troubleshooting is to remove certbot and certbot-apache - then check the site-packages to verify that all remnants of certbot is gone.

site-packages? what do you mean by that sorry?

In this case, it is a folder. After you removed the certbot packages, the certbot folders /usr/lib/python3.10/site-packages should also be gone.

/usr/lib/python3.10/site-packages/ is still there with folders in it

also do any of these dependency packages use python 3.10 of that folder?

image

Of course it is still there, all installed python modules have a folder in there. It is about certbot folders in /usr/lib/python3.10/site-packages/ . More specifically, all folder that have a name that starts with certbot

Please do not post screenshots, it is not helpful.

Oh ok I see well in that case no there is no certbot folder in there

How arenā€™t screenshots helpful? itā€™s showing you something while I am asking something giving you a visible representation. :stuck_out_tongue:

So no folder that starts with certbot .

What happens if you start python and run

import certbot.main

Text canā€™t be copied. A picture of text, is pointless.

1 Like

Nothing happens if I do that python command

Iā€™m not showing logs in the screenshot, just a screenshot of dependencies for the question but fair enough.

That is not good. This means certbot is still installed.

Probably not the version form the repository, but in some other way. You should start remembering what you did and, most importantly, how you did it.

You should see

$ python 
Python 3.10.9 (main, Dec 19 2022, 17:35:49) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import certbot.main 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'certbot'
>>>

@gameslayer9999, letā€™s check for certbot after uninstallation of all its packages.

First, remove all package orphans:

pamac remove --orphans

Then get all site-packages locations:

python -c 'import site; print(site.getsitepackages())'

For example, my output is:

['/usr/lib/python3.10/site-packages']

And check for mentions of certbot in each folder from the array above:

grep -rnw '/usr/lib/python3.10/site-packages' -e 'certbot'

And you will know where it comes from. Good luck!

Hmm are you sure? Iā€™ll have to have a look when Iā€™m free but the only thing I did was installed certbot from the repo because I needed it

Thabks, as soon as Iā€™m free Iā€™ll try it out and report back :slight_smile:

The certbot.main module can only be imported if certbot is installed. If it is not installed, it will result in an error.

We ask you to remove the repo packages of certbot and check if in the site-packages is not trace of certbot. You said that there is no folder that starts with certbot. But you can still import the module, it means it is not removed and still there. Maybe manually installed with pip in your Home folder, only you can know.
Do what @stasadev wrote and maybe you can find it.

But it didnt give a error and itā€™s not installed

You said

An Error is not nothing. :man_facepalming:

Thanks for the reply by the way, it looks like everything is clear :slight_smile:

[corey@corey-serverpc ~]$ python -c 'import site; print(site.getsitepackages())'
['/usr/lib/python3.10/site-packages']
[corey@corey-serverpc ~]$ grep -rnw '/usr/lib/python3.10/site-packages' -e 'certbot'

I cleared the orphan packages and didnā€™t find anything with grep, should I try and reinstall it now?

if you look at upstream what system is recommended they say snaps: Certbot Instructions | Certbot There is also the way to use PIP. If you search for upcoming python system packages only a few will get updated. Using packages from a distro seems not to be recommended by the upstream project.

As suggested here in the thread there might be a local issue with your system.

Here is a similar problem discussed on reddit. Here PIP was involved: https://www.reddit.com/r/nginxproxymanager/comments/z7ysug/certbot_issues_alleged_version_conflict/

Letā€™s check the import again:

python -c 'import certbot.main; certbot.main.main()'

The above command is the same as running certbot directly.

If you donā€™t have certbot installed, it comes from somewhere else. You can check if it comes from pip:

pip list | grep certbot
pip list --user | grep certbot
sudo pip list | grep certbot

yeah no thanks, Iā€™d rather smack myself in the head than use Snap haha :rofl: :face_vomiting:

I coulde maybe look into using pip but Iā€™d rather figure out whats going on here and try and resolve it :slight_smile:

Here is the logs

[corey@corey-serverpc ~]$ python -c 'import certbot.main; certbot.main.main()'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'certbot'

Hmm it looks like jellyfin has a pip package called certbot-dns-duckdns 1.1 but I couldnā€™t actually do anything with it so I removed it doing pip remove certbot-dns-duckdns

After removing it it is now working so thank you for kindly and patiently going through the steps to figure out what the actual issue was and not push me away to deal with it myself. I will also report that certbot-dns-duckdns conflicts with certbot but I found that removing it and reinstalling certbot-dns-duckdns allows it to exist without conflicting and causing issues so I wonder if your supposed to install certbot first before installing jellyfin-server tho that does sound a bit silly.

1 Like