Somehow my certbot installation got broken, I got the following error when running certbot:
I ran this command:
$ certbot --version
It produced this output:
An unexpected error occurred:
pkg_resources.VersionConflict: (requests 2.27.1 (/snap/certbot/2192/lib/python3.8/site-packages), Requirement.parse('requests~=2.28'))
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/tmp4mvcnzyr/log or re-run Certbot with -v for more details.
logfile:
2022-08-19 22:45:25,674:DEBUG:urllib3.connectionpool:http://localhost:None "GET /v2/connections?snap=certbot&interface=content HTTP/1.1" 200 790
2022-08-19 22:45:26,872:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/snap/certbot/2192/bin/certbot", line 8, in <module>
sys.exit(main())
File "/snap/certbot/2192/lib/python3.8/site-packages/certbot/main.py", line 19, in main
return internal_main.main(cli_args)
File "/snap/certbot/2192/lib/python3.8/site-packages/certbot/_internal/main.py", line 1705, in main
plugins = plugins_disco.PluginsRegistry.find_all()
File "/snap/certbot/2192/lib/python3.8/site-packages/certbot/_internal/plugins/disco.py", line 241, in find_all
plugin_ep = cls._load_entry_point(entry_point, plugins, with_prefix=False)
File "/snap/certbot/2192/lib/python3.8/site-packages/certbot/_internal/plugins/disco.py", line 261, in _load_entry_point
plugin_ep = PluginEntryPoint(entry_point, with_prefix)
File "/snap/certbot/2192/lib/python3.8/site-packages/certbot/_internal/plugins/disco.py", line 60, in __init__
self.plugin_cls: Type[interfaces.Plugin] = entry_point.load()
File "/snap/certbot/2192/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2457, in load
self.require(*args, **kwargs)
File "/snap/certbot/2192/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2480, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/snap/certbot/2192/lib/python3.8/site-packages/pkg_resources/__init__.py", line 788, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (requests 2.27.1 (/snap/certbot/2192/lib/python3.8/site-packages), Requirement.parse('requests~=2.28'))
2022-08-19 22:45:26,872:ERROR:certbot._internal.log:An unexpected error occurred:
2022-08-19 22:45:26,872:ERROR:certbot._internal.log:pkg_resources.VersionConflict: (requests 2.27.1 (/snap/certbot/2192/lib/python3.8/site-packages), Requirement.parse('requests~=2.28'))
The operating system my web server runs on is (include version):
ubuntu 20.04.
I can login to a root shell on my machine (yes or no, or I don't know):
yes
I haven't changed anything on the system, maybe an auto update.
I don't know exactly when the problem occurred, anyway the last successful cert update was in June.
How can I solve the issue?