AttributeError: module 'lib' has no attribute 'X509_get_notAfter'

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:
http://fleksteknoloji.com

I ran this command:
sudo apt install python3-certbot-nginx
sudo certbot --nginx certonly

It produced this output:
An unexpected error occurred:
AttributeError: module 'lib' has no attribute 'X509_get_notAfter'
Please see the logfiles in /var/log/letsencrypt for more details.

My web server is (include version):
nginx version: nginx/1.18.0 (Ubuntu)

The operating system my web server runs on is (include version):
Ubuntu 20.04.4 LTS

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 0.40.0

This specific error has been addressed earlier in Lib has no attributes. While not entirely the same (apt vs pip), the dependency issue with pyopenssl is probably also what is the problem in your case.

9 Likes

Thank your fast answer. I cheked link and I tried the snapd method and it works.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.