使用certbot-auto续期Let's Encrypt证书报错

egspace 5个月前 413

今天打开网站一看,提示网站不安全无法继续访问,原来是自己的Let's Encrypt证书到期了,但是我之前是写好计划任务的啊,我在想应该在前两天任务计划就已经执行了,现在不应该再出现这个错误!

我在想也许是计划任务没写对之类的,既然不能自动执行,我就手动续期一下试试,没想到居然报错了,我运行的续期命令是$sudo ./certbot-auto renew --post-hook "/etc/nginx/sbin/nginx -s reload",运行之后报了一大长串如下错误提示:

pip prints the following errors:
=====================================================
Collecting argparse==1.4.0 (from -r /tmp/tmp.ybPiPZtXYa/letsencrypt-auto-requirements.txt (line 11))
 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl
Collecting pycparser==2.14 (from -r /tmp/tmp.ybPiPZtXYa/letsencrypt-auto-requirements.txt (line 17))
 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/6d/31/666614af3db0acf377876d48688c5d334b6e493b96d21aa7d332169bee50/pycparser-2.14.tar.gz (223kB)
......
Collecting certbot==0.25.1 (from -r /tmp/tmp.ybPiPZtXYa/letsencrypt-auto-requirements.txt (line 215))
 Could not find a version that satisfies the requirement certbot==0.25.1 (from -r /tmp/tmp.ybPiPZtXYa/letsencrypt-auto-requirements.txt (line 215)) (from versions: 0.6.0 0.7.0 0.8.0 0.8.1 0.9.0 0.9.1 0.9.2 0.9.3 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.12.0 0.13.0 0.14.0 0.14.1 0.14.2 0.15.0 0.16.0 0.17.0 0.18.0 0.18.1 0.18.2 0.19.0 0.20.0 0.21.0 0.21.1 0.22.0 0.22.1 0.22.2 0.23.0 0.24.0)
No matching distribution found for certbot==0.25.1 (from -r /tmp/tmp.ybPiPZtXYa/letsencrypt-auto-requirements.txt (line 215))
=====================================================
Certbot has problem setting up the virtual environment.
We were not be able to guess the right solution from your pip 
output.
Consult https://certbot.eff.org/docs/install.html#problems-with-python-virtual-environment
for possible solutions.
You may also find some support resources at https://certbot.eff.org/support/ .

也在网上进行了一番搜索,根据网上的搜索结果我尝试了以下方法也没能解决:

  • 运行$sudo pip install --upgrade pip来升级PIP后再续期也报错
  • 对.pip目录下对pip.conf进行改名后再续期也报同样的错误
  • 将PIP的源改用清华的PIP源再运行续期还是报错

实在是找不到解决的方法,网上搜索到的答案就这些,不管我怎么试还是无法续期,网站都一天多打不开了,虽然可以改为HTTP形式去访问,但我还是想继续折腾一下,希望继续保留HTTPS方式访问,各位知道有其他的解决方案吗?

0 人点赞  ∙  0 人收藏  
加入收藏 点赞 我要评论

目前共有 2 条回复

DeHoo
DeHoo 5个月前

避免错误,建议最好不用编译版!

你可以用acme.sh来进行续期,从这里去github查看acme.sh的wiki
除此之外,你也可以通过Certbot网站上的教程来续期,使用很傻瓜式!地址在此:https://certbot.eff.org/

qqcb3aab4
qqcb3aab4 5个月前

我把pip.conf改名后解决的,看来我遇到的跟楼主遇到的不是一类问题!