LoginSignup
2
1

More than 3 years have passed since last update.

CentOS7/ LetsEncrypt更新エラー / certbot renew でpyOpenSSLのインポートエラー "Try upgrading to v0.14 or newer"

Posted at

背景

#yum updateした時にPythonパッケージでエラーが出たのでごちゃごちゃしていたらいつの間にかLetsEncryptが使えなくなりました。具体的にはcertbot renewで以下のエラー

ImportError: 'pyOpenSSL' module missing required functionality. Try upgrading to v0.14 or newer.

pyOpenSSLはyumでcertbotをインストールした時に自動的にインストールされていてバージョンは0.13.1
これをアップデートをすればいいのですが、、、てこづりました。

対処方法/NG版

まずpipコマンドを使ってアップグレードしようと思いましたが、「削除できない」エラーが発生します。
削除してからインストールしようとしても削除できません。

試したコマンド

# pip uninstall pyOpenSSL
# pip install --upgrade --force-reinstall pyOpenSSL

エラー内容

ERROR: Cannot uninstall 'pyOpenSSL'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

次にyum remove pyOpenSSLを試しますが依存関係のあるライブラリ全て(certbot等)も削除されてしまいます・・・。

対処方法/OK版

yumでインストールしたpyOpenSSLだけを削除するにはrpmコマンドを使います。

rpm -e --nodeps pyOpenSSL

この後にpip install pyOpenSSLでインストール。解決しました。

2
1
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
1