certbot実行時のエラー virtualenv: command not found

投稿者: | 2018年7月28日

certbot実行時に下記のエラーが発生しました。

$ ./certbot-auto certonly --standalone -t
Bootstrapping dependencies for RedHat-based OSes that will use Python3... (you can skip this with --no-bootstrap)
yum is /usr/bin/yum
To use Certbot, packages from the EPEL repository need to be installed.
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.cat.net
* extras: mirrors.cat.net
* remi-safe: ftp.riken.jp
* updates: mirrors.cat.net
Package epel-release-6-8.noarch already installed and latest version
Nothing to do
No supported Python package available to install. Aborting bootstrap!

エラーメッセージを見る限り、python3が必要と出てますが2.7でも動作するので2.7を入れました。
既存で入っていたpython2.6をアップデートしたかったのですが消すことができなかったので共存させました。

$ sudo yum install centos-release-scl
$ yum install python27 python27-python-tools
$ scl enable python27 bash
$ python --version
Python 2.7.13

この後でcertbot-autoを実行しましたが、今度は別のエラーが出ました。

Creating virtual environment...
./certbot-auto: line 975: virtualenv: command not found

原因はvirtualenvがないというものです。
pipからインストールしたら解決できました。

$ easy_install pip
$ pip install virtualenv

Let’s Encryptの証明書を取得するためにcertbotを導入する必要がありますがcentOS6系では結構エラーが発生するようです。
こちらのポータルサイトでも対処方法等が記述されてますので参考にさせて頂きました。
https://letsencrypt.jp/usage/centos6-error.html

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA