Reinstall from certbot outage

Introduction

certbot has died. .. Rather, the certificate of https communication that was operated in the production environment was suddenly destroyed and it was difficult to return it, so it is a memorandum.

Development environment

ruby 2.5.7 Rails 5.2.3 AWS ec2 nginx puma

procedure

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 
* All you have to do is answer yes

Error collection

Error ①

Error code

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

Cause

--Python version mismatch

Improvement code

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

Error ②

Error code

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

Cause

--Virtualenv version mismatch

Improvement code

sudo pip uninstall virtualenv
pip install virtualenv==15.1.0

Error ③

Error code

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

Cause

--Pip version mismatch

Improvement code

sudo easy_install pip == 9.0.3

Reference site

https://yoshinorin.net/2018/09/10/letsencrypt-cannot-update/

Recommended Posts

Reinstall from certbot outage