Centos利用Certbot安装SSL证书报错:The requested nginx plugin does not appear to be installed

Centos利用Certbot安装SSL证书报错:The requested nginx plugin does not appear to be installed

从网上查解决方案,千篇一律让执行:

sudo apt install python3-certbot-nginx

但是我的机器上执行后直接报:没有可用软件包 python3-certbot-nginx。

WTF!!!

后来经查询才得知,在新版本的 Certbot 中,Nginx 插件可能被称为 nginx,而不是 python3-certbot-nginx。

而后改为执行:

sudo yum install certbot-nginx

问题解决!