背景
コレをしたくて Python3.6 が必要になり、Python のバージョンを上げるよりも Ubuntu のバージョンあげてしまうほうが楽だよな(実際、そのとおりなところが Ubuntu のいい所と Python の嫌なところなんですが)、という大胆な手抜きを行った所、掲題の件、痛い目にあいました
つきましては、ささやかながらも同様のご経験をされた方のお役に立つこともあるかもしれぬと思い、本稿を上梓させていただきました次第です
現象
Requesting to rerun ./certbot-auto with root privileges...
Error: couldn't get currently installed version for /opt/eff.org/certbot/venv/bin/letsencrypt:
Can't get currently version とか言われてます
ううむ、Ubuntu あげたのが悪かったか
対応
ダクダクって文献1を見つけ、書かれているとおりに certbot をインストール、ただし、かかれているように既存の certbot-auto を消したりはしませんでした(相変わらず怠惰)
sudo apt install certbot
再度ためしてみると
ueda@scw-app1:~$ sudo certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/barcodelogger.uedasoft.com.conf
-------------------------------------------------------------------------------
Attempting to parse the version 0.27.1 renewal configuration file found at /etc/letsencrypt/renewal/barcodelogger.uedasoft.com.conf with version 0.23.0 of Certbot. This might not work.
Cert is due for renewal, auto-renewing...
Could not choose appropriate plugin: The requested apache plugin does not appear to be installed
Attempting to renew cert (barcodelogger.uedasoft.com) from /etc/letsencrypt/renewal/barcodelogger.uedasoft.com.conf produced an unexpected error: The requested apache plugin does not appear to be installed. Skipping.
apache plugin が見当たらないとの御宣託
で、さらにダクダクって文献2をみつけ、書かれている通り python3-certbot-apache をインストール
ueda@scw-app1:~$ sudo apt install python3-certbot-apache
再度、renew をためしたら、今度はうまくいきました
感想
クリス・アンダーソン(TED の方じゃなくて、ロングテールの方の)がちょっと前に「私の人生の 1/3 は Python のバージョンの不一致に費やしている」ってツイートしてた1のですが、大袈裟じゃないかも
references
- 文献1: Let's Encryptで証明書を更新できなくなったので再インストールして再発行した
- 16.04 から 18.04 にあげたら更新できなくなったというご報告
- この記事のおかげで助かりました、ありがとうございました
- 文献2: Let’s encryptの証明書の更新がうまくいかないと思ったら、Python3対応のApache pluginがインストールされていなかった件
- こちらの記事のおかげで助かりました。本当にどうもありがとうございました
-
そう tweet してた記憶があるのですが、今、リンク貼ろうとおもって探したらみつけられませんでした。どうもすみません ↩