尝试更新我的证书时出现“错误:无法获取当前安装的letsencrypt版本”

尝试在Ubuntu 15.04 + nginx服务器上续订我的letsencrypt证书时,我开始出现错误。

即使当我尝试运行certbot-auto命令,我看到以下内容:

 Error: couldn't get currently installed version for /root/.local/share/letsencrypt/bin/letsencrypt: An unexpected error occurred: VersionConflict: (certbot 0.11.1 (/root/.local/share/letsencrypt/lib/python2.7/site-packages), Requirement.parse('certbot==0.10.2')) Please see the logfile 'certbot.log' for more details. 

certbot.log文件提供了以下堆栈跟踪:

 Traceback (most recent call last): File "/root/.local/share/letsencrypt/bin/letsencrypt", line 11, in <module> sys.exit(main()) File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/main.py", line 858, in main plugins = plugins_disco.PluginsRegistry.find_all() File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/plugins/disco.py", line 183, in find_all plugin_ep = PluginEntryPoint(entry_point) File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/certbot/plugins/disco.py", line 34, in __init__ self.plugin_cls = entry_point.load() File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2295, in load self.require(*args, **kwargs) File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2318, in require items = working_set.resolve(reqs, env, installer, extras=self.extras) File "/root/.local/share/letsencrypt/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 859, in resolve raise VersionConflict(dist, req).with_context(dependent_req) VersionConflict: (certbot 0.11.1 (/root/.local/share/letsencrypt/lib/python2.7/site-packages), Requirement.parse('certbot==0.10.2')) 

我也尝试运行sudo apt-get install certbotsudo apt-get install certbot-auto ,而我又遇到了一个错误: E: Unable to locate package certbot

这里可能是什么问题,我该怎么办?

引发的exception实际上告诉你什么是错误的,你打电话是一个certbot版本太晚,比预期的。

从外观来看,这是一个有内部冲突的certbot的更新版本,我build议从GitHub中certbot-auto最新版本,然后重新启动certbot-auto

如果这不起作用,清除certbot的virtualenv并让它安装新鲜。