关于Certbot不能更新https证书问题:
报错问题如下
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/ .
问题原因,Certbot 和pip 的版本问题
百度后有两种解决办法:
1.回退版本进行更新:
-
git clone https://github.com/letsencrypt/letsencrypt/
-
cd letsencrypt
-
git reset --hard ce4e00569e6d8ed3d51c5a078d4281bec5f8e5f0 # see release page for more info
-
./letsencrypt-auto --no-self-upgrade renew --force-renew
具体来说就是重新下载了letsencrypt;然后git回退letsencrypt到指定版本;然后再执行renew,但是加上了
--no-self-upgrade
第二种办法,调整pip
1).提示错误:We were not be able to guess the right solution from your pip output.
网上搜了一下;是因为certbot-auto 自动升级失败的问题。
是阿里云的镜像没同步完整pypi仓库,又通过pip的方式安装了certbot.
所以可以删掉/root/.pip/pip.conf
使用官方镜像就解决问题了。
或者重新安装pip
测试好用的一个方法
1 2 3 |
|
还试过别的方法
1 2 3 4 5 6 7 8 |
|
pip install --upgrade pip
升级完成后,再次执行Certbot更新测试:
./certbot-auto renew --dry-run
执行手动更新:
./certbot-auto renew -v