LoginSignup
0
0

More than 3 years have passed since last update.

certbot停止からの再インストール

Last updated at Posted at 2020-10-17

はじめに

certbotが死にました。。
というよりかは本番環境で運用していたhttps通信の証明証がいきなり破棄されて、戻すのに大変だったので備忘録。

開発環境

ruby 2.5.7
Rails 5.2.3
AWS ec2
nginx
puma

手順

cd ~
rm -r -f certbot
git clone https://github.com/certbot/certbot.git
cd certbot/
chmod a+x certbot-auto
sudo ./certbot-auto --nginx --debug 
※あとはyesに答えるだけ

エラー集

エラー①

エラーコード

Traceback (most recent call last):
  File "<stdin>", line 27, in <module>
  File "<stdin>", line 19, in create_venv
  File "/usr/lib64/python2.7/subprocess.py", line 185, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

原因

  • pythonのバージョンの不一致

改善コード

alternatives --set python /usr/bin/python2.7

エラー②

エラーコード

pkg_resources.DistributionNotFound: The 'virtualenv==15.1.0' distribution was not found and is required by the application

原因

  • virtualenvのバージョンの不一致

改善コード

sudo pip uninstall virtualenv
pip install virtualenv==15.1.0

エラー③

エラーコード

pkg_resources.DistributionNotFound: The 'pip==9.0.3' distribution was not found and is required by the application

原因

  • pipのバージョンの不一致

改善コード

sudo easy_install pip == 9.0.3

エラー④

エラーコード

Skipping bootstrap because certbot-auto is deprecated on this system.
./certbot-auto has insecure permissions!
To learn how to fix them, visit https://community.letsencrypt.org/t/certbot-auto-deployment-best-practices/91979/
Your system is not supported by certbot-auto anymore.
Certbot cannot be installed.
Please visit https://certbot.eff.org/ to check for other alternatives.

原因

  • 権限付与
  • 周辺apiの未実装

改善コード

sudo wget -r --no-parent -A 'epel-release-*.rpm'  http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/
sudo rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-*.rpm
sudo yum install certbot python2-certbot-nginx
↓
sudo certbot --nginx

参考サイト

https://yoshinorin.net/2018/09/10/letsencrypt-cannot-update/
https://qiita.com/_whitecat_22/items/14819ce3d6a41cc0d6b2

0
0
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
0
0