LoginSignup
2
2

More than 5 years have passed since last update.

Amazone linux にwgetでinstallしたcertbot-auto が動かなくなったときの対応

Last updated at Posted at 2018-03-27

なにがおきたの?

Amazone linux にwgetでinstallしたcertbot-auto が以下のようなエラーを発生するようになってました

$ certbot-auto --help
Requesting to rerun /usr/local/bin/certbot-auto with root privileges...
Upgrading certbot-auto 0.22.0 to 0.22.2...
Replacing certbot-auto...
Creating virtual environment...
Installing Python packages...
Installation succeeded.
Traceback (most recent call last):
  File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 7, in <module>
    from certbot.main import main
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/certbot/main.py", line 10, in <module>
    import josepy as jose
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/__init__.py", line 41, in <module>
    from josepy.interfaces import JSONDeSerializable
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/interfaces.py", line 8, in <module>
    from josepy import errors, util
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/josepy/util.py", line 4, in <module>
    import OpenSSL
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/rand.py", line 12, in <module>
    from OpenSSL._util import (
  File "/opt/eff.org/certbot/venv/local/lib/python2.7/dist-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
ImportError: No module named cryptography.hazmat.bindings.openssl.binding

TL;DR;

cryptographyも必要だけど、すなおにpipで入れなおしましょう

環境

$ cat /etc/system-release
Amazon Linux AMI release 2016.03

wgetで /usr/local/bin/certbot-auto をインストールしてました

やったこと

sudo rm /usr/local/bin/certbot-auto
sudo /usr/local/bin/pip install cryptography
sudo /usr/local/bin/pip install certbot

おわり

参考

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2