debiancertbot

Error while renewing certificate with certbot on Debian


While executing certbot renew command suddenly this error occurs:

ImportError: cannot import name 'FILETYPE_PEM' from 'OpenSSL.crypto' (/usr/lib/python3/dist-packages/OpenSSL/crypto.py)

OS: on Debian 12 python: 3.9 certbot: 1.12.0 HTTP service: Nginx

I expect that as usual the certificate be renewed.


Solution

  • I managed to fix it by unsintalling python3-openssl and reinstalling python3-certbot:

    sudo apt remove python3-openssl
    sudo apt install python3-certbot
    sudo certbot renew
    sudo apt-get install python3-certbot-nginx