关于Certbot不能更新https证书问题

关于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.回退版本进行更新:

  1. git clone https://github.com/letsencrypt/letsencrypt/

  2. cd letsencrypt

  3. git reset --hard ce4e00569e6d8ed3d51c5a078d4281bec5f8e5f0 # see release page for more info

  4. ./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

wget  https://bootstrap.pypa.io/get-pip.py

python get-pip.py

pip -V #查看版本

还试过别的方法

1

2

3

4

5

6

7

8

#安装setuptools

 

wget https://bootstrap.pypa.io/ez_setup.py -O - | python

 

#setuptools 正确安装完成后,easy_install 命令就会被安装在 /usr/local/bin 目录下了。

#为新版 Python 安装 pip

 

easy_install pip

pip install --upgrade pip

 

升级完成后,再次执行Certbot更新测试:

./certbot-auto renew --dry-run

执行手动更新:

./certbot-auto renew -v

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值