[Let’s Encrypt] The requested nginx plugin does not appear to be installed の解決方法

Let’s Encrypt で The requested nginx plugin does not appear to be installed というエラーの解決方法をご紹介します。

Let's Encrypt

前提条件

  • SSL 証明書: Let’s Encrypt
  • サーバー: Ubuntu 16.04.2 LTS

エラー発生条件) The requested nginx plugin does not appear to be installed

$ certbot --version
certbot 0.31.0

以下のように certbot コマンドを実行したところ The requested nginx plugin does not appear to be installed エラーが発生しました。

$ sudo certbot \
--authenticator standalone \
--installer nginx \
-d example.com \
--pre-hook "/bin/systemctl stop nginx" \
--post-hook "/bin/systemctl start nginx"
 
Saving debug log to /var/log/letsencrypt/letsencrypt.log
The requested nginx plugin does not appear to be installed

解決方法) python-certbot-nginx インストール

エラー The requested nginx plugin does not appear to be installed を解決するには python-certbot-nginx をインストールするだけで OK です。

sudo apt-get install python-certbot-nginx

以上、Let’s Encrypt の Nginx プラグインが無かったのでインストールした、現場からお送りしました。