Certificate fails on CentOS 7

Just reinstalled Certbot on my server using

yum install certbot python2-certbot-apache

and now whenever I run the command I get this stack trace:

Traceback (most recent call last):
File "/bin/certbot", line 5, in <module>
  from pkg_resources import load_entry_point
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007, in <module>
  working_set.require(__requires__)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in require
  needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve
  raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: certbot==1.4.0

Removing the package and reinstalling hasn’t helped, and I did notice that the EPEL repository is installing 1.4 rather than the newest 1.5. Any ideas?

How about:

yum -y reinstall python2-certbot

That provides the files that the error is complaining about. Depending what exactly happened before you reinstalled Certbot (e.g. if you overwrote some stuff with pip), you may need to reinstall Certbot’s dependencies as well.

1 Like

That was it, thank you so much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.