Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Error - AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK' #407

Closed
itsgitz opened this issue Jan 19, 2024 · 2 comments

Comments

@itsgitz
Copy link

itsgitz commented Jan 19, 2024

When running this script on my server (Ubuntu 22.04), I had an error like AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'. It seems like, It happened when the script was trying to install/enable Certbot. The complete error:

No VM guests are running outdated hypervisor (qemu) binaries on this host.
Traceback (most recent call last):
  File "/usr/bin/certbot", line 33, in <module>
    sys.exit(load_entry_point('certbot==1.21.0', 'console_scripts', 'certbot')())
  File "/usr/bin/certbot", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/certbot/main.py", line 2, in <module>
    from certbot._internal import main as internal_main
  File "/usr/lib/python3/dist-packages/certbot/_internal/main.py", line 17, in <module>
    import josepy as jose
  File "/usr/lib/python3/dist-packages/josepy/__init__.py", line 43, in <module>
    from josepy.json_util import (
  File "/usr/lib/python3/dist-packages/josepy/json_util.py", line 14, in <module>
    from OpenSSL import crypto
  File "/usr/local/lib/python3.10/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1556, in <module>
    class X509StoreFlags(object):
  File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 1577, in X509StoreFlags
    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
Job for nginx.service failed.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.
SSL/HTTPS is enabled!

I've found the solution for fixing this error by upgrading the PyOpenSSL library, so I added the upgrade syntax on the script like the image below:

image

And now the installation script works fine and no error. Should I make a PR for this? But I have to reproduce the error to make sure.

Thank you!

@Yenthe666
Copy link
Owner

Seems like a duplicate of #393

@itsgitz
Copy link
Author

itsgitz commented Jan 23, 2024

Okay and seems like it solved and closed at #398.
Thank you!

@itsgitz itsgitz closed this as completed Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants