Server/Linux

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

달빛에취하다 2022. 2. 23. 11:02

작업 상태

1. ubuntu 20.04 에 설치 스크립트 Ajenti를 설치했다가 모듈 로드 문제로 삭제하고 Cockpit 으로 변경

   (ajenti 설치 - How To Install Ajenti Control Panel on Ubuntu 20.04 | ComputingForGeeks )

   (ajenti 삭제 - Uninstall Ajenti · GitHub)

 

2. nginx 설치 및 certbot (let's encrpty) 설치

3. certbot 으로 인증서 발급 시  AttributeError: 'X509' object has no attribute '_x509'  오류 발생

 

위의 작업에서 1번 작업에서 pip pyOpenSSL 설치 중에 구버전으로 설치되어 복구 

sudo pip install -U pyOpenSSL
/usr/lib/python3/dist-packages/OpenSSL/crypto.py 
/usr/lib/python3/dist-packages/certbot/crypto_util.py
/usr/lib/python3/dist-packages/certbot/main.py

#관련 오류는 대부분 동일한 내용으로 처리

 

* Python requests and streaming - AttributeError: 'X509' object has no attribute '_x509' - Stack Overflow