This is a new install of Buster on a rpi 4. Upon installing nginx, php and cerbot, I perform a test run creating certificates using the webroot method. It looks like it will pass but failed because it could not verify my domain. That is given because my domain isn’t setup on this server.
There was some error outputs as it was creating the file. When it finished and I try to perform a test run creating a wildcard, I am prompt with this error and any command of `sudo certbot…’ the same error pops up. Not sure what to do at this point.
certbot --version
Traceback (most recent call last):
File "/usr/local/bin/certbot", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3191, in <module>
@_call_aside
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3175, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3204, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 585, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (cryptography 2.6.1 (/usr/lib/python2.7/dist-packages), Requirement.parse('cryptography>=2.8'), set(['PyOpenSSL']))
I have removed certbot from this location. /usr/local/bin/certbot
I am still getting similar error.
certbot -v
Traceback (most recent call last):
File "/usr/bin/certbot", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3191, in <module>
@_call_aside
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3175, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3204, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 585, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (cryptography 2.6.1 (/usr/lib/python2.7/dist-packages), Requirement.parse('cryptography>=2.8'), set(['PyOpenSSL']))
Fixed.
I believe I’ve gotten Certbot sorted out. Somewhere during the installation of certbot-dns-cloudflare plugin using this certbot guide, but the installation had an error saying Cryptography requires a newer version. I, than, tried to install certbot-dns-cloudflare using pip and it installed a different version of Certbot in /usr/local/bin. Cerbot doesn’t run well when multiple versions of Cerbot is installed. So I uninstall the pip version of Cerbot by listing what pip installed and using the pip3 uninstall.
pip3 list | grep certbot
sudo pip3 uninstall <package-name>