How to fix LetsEncrypt Upgrade Error in Amazon Linux 2

[et_pb_section admin_label=”section”] [et_pb_row admin_label=”row”] [et_pb_column type=”4_4″][et_pb_text admin_label=”Text”]

After Installing Certbot on Amazon Linux 2, and then momentarily Upgrading Certbot returns the following error below:

Error: couldn't get currently installed version for /opt/
Traceback (most recent call last):
  File "/opt/", line 7, in <module>
    from certbot.main import main
  File "/opt/", line 10, in <module>
    import josepy as jose
  File "/opt/", line 44, in <module>
    from josepy.interfaces import JSONDeSerializable
  File "/opt/", line 8, in <module>
    from josepy import errors, util
  File "/opt/", line 4, in <module>
    import OpenSSL
  File "/opt/", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/opt/", line 12, in <module>
    from OpenSSL._util import (
  File "/opt/", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
ImportError: No module named cryptography.hazmat.bindings.openssl.binding

To fix the problem, run the commands below:

$ ln -s /opt/ /opt/
$ ln -s /opt/ /opt/
$ ln -s /opt/ /opt/
$ ln -s /opt/ /opt/
$ ln -s /opt/ /opt/
$ ln -s /opt/ /opt/
$ ln -s /opt/ /opt/
$ ln -s /opt/ /opt/
$ ln -s /opt/ /opt/

Once done, then run the following:

$ /opt/ install cryptography interface

Thanks to xinxilas

[/et_pb_text][/et_pb_column] [/et_pb_row] [/et_pb_section]


Leave a Reply

Your email address will not be published. Required fields are marked *

Keep up, get in touch.


Instagram / Facebook

Designed with WordPress