You are not logged in.
Hi, recently certbot has stopped working - and is returning:
sudo /usr/bin/certbot renew --quiet --agree-tos --deploy-hook "systemctl reload httpd.service" --dry-run
An unexpected error occurred:
pkg_resources.ContextualVersionConflict: (protobuf 4.21.2 (/usr/lib/python3.10/site-packages), Requirement.parse('protobuf<4.0.0dev,>=3.15.0'), {'googleapis-common-protos'})
How can I resolve this?
Googleapis-common-protos and protobuf are at versions:
pip list | grep proto
googleapis-common-protos 1.56.4
protobuf 3.20.1
Update, the above packages were from my local user's pip, not the root's. I needed to upgrade root's googleapis-common-protos from 1.56.2 to 1.56.4, which seems to have resolved the problem:
sudo pip install googleapis-common-protos --upgrade
Last edited by bergqvistjl (2022-07-14 07:40:20)
Offline
You should in general not use sudo pip for anything as you are creating conflicts with system packages. You likely already did at some point that certbot didn't work (assuming you installed that from the repos)
Online
I have the same problem, and FYI I'm not using pip.
system's protobuf were updated but certbot system's package still requires protobuf < 4:
# pacman -Q certbot
certbot 1.29.0-1
# pacman -Q protobuf
protobuf 21.2-1
# pacman -Qo /usr/lib/python3.10/site-packages/protobuf-4.21.2-py3.10.egg-info/
/usr/lib/python3.10/site-packages/protobuf-4.21.2-py3.10.egg-info/ is owned by python-protobuf 21.2-1
As additional info, this is the whole log from certbot about the complain:
2022-07-19 09:57:33,967:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.10/site-packages/certbot/main.py", line 19, in main
return internal_main.main(cli_args)
File "/usr/lib/python3.10/site-packages/certbot/_internal/main.py", line 1705, in main
plugins = plugins_disco.PluginsRegistry.find_all()
File "/usr/lib/python3.10/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 "/usr/lib/python3.10/site-packages/certbot/_internal/plugins/disco.py", line 261, in _load_entry_point
plugin_ep = PluginEntryPoint(entry_point, with_prefix)
File "/usr/lib/python3.10/site-packages/certbot/_internal/plugins/disco.py", line 60, in __init__
self.plugin_cls: Type[interfaces.Plugin] = entry_point.load()
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2457, in load
self.require(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2480, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 788, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (protobuf 4.21.2 (/usr/lib/python3.10/site-packages), Requirement.parse('protobuf<4.0.0dev,>=3.15.0'), {'googleapis-common-protos'})
2022-07-19 09:57:33,968:ERROR:certbot._internal.log:An unexpected error occurred:
2022-07-19 09:57:33,968:ERROR:certbot._internal.log:pkg_resources.ContextualVersionConflict: (protobuf 4.21.2 (/usr/lib/python3.10/site-packages), Requirement.parse('protobuf<4.0.0dev,>=3.15.0'), {'googleapis-common-protos'})
I see some paths saying plugins so maybe it's related not with certbot package itself but certbot-dns-google plugin package. However is the same version as certbot:
# pacman -Q certbot-dns-google
certbot-dns-google 1.29.0-1
Last edited by manueljben (2022-07-19 08:31:09)
Offline
I seem to be having the same problem, though
sudo pip install googleapis-common-protos --upgrade
did not work for me. I believe I have installed all my python packages with pacman, rather than pip, like the last poster, and I'm wondering if maybe that's what is causing the issue.
$ pacman -Q protobuf
protobuf 21.12-1
and
$ pip list | grep proto
googleapis-common-protos 1.58.0
protobuf 4.21.12
so they appear to be in conflict. Any ideas for how I can resolve this?
I have tried running certbot as user and with sudo, but they both give me the error below:
$ sudo certbot renew
An unexpected error occurred:
pkg_resources.ContextualVersionConflict: (protobuf 3.20.1 (/usr/lib/python3.10/site-packages), Requirement.parse('protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5'), {'google-api-core'})
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-b9rau1fu/log or re-run Certbot with -v for more details.
Offline
I tried a bunch of things, but for me the only way I was able to get it working was by uninstalling the certbot packages (using pacman because they were all installed that way) and reinsalling by following the pip-based virtual environment installation instructions.
Offline