I encountered this error while trying to renew Let's Encrypt Certbot-Auto
/opt/eff.org/certbot/venv/bin/python: No module named pip.__main__; 'pip' is a package and cannot be directly executed
My webserver is using Ubuntu 12.04.3 LTS (precise).
My certbot-auto is located at /data_local/app/cron_shell/lets_encrypt (yours will be different)
I searched for a solution for 2 hours before finding this one that worked:
STEP 1 - MAKE COPY OF EXISTING CERTBOT-AUTO
cp /data_local/app/cron_shell/lets_encrypt/certbot-auto /data_local/app/cron_shell/lets_encrypt/certbot-auto-20201114
STEP 2 - EDIT THE CONTENTS OF CERTBOT-AUTO
pip_version = StrictVersion(check_output([python, '-m', 'pip', '--version'])
TO
pip_version = StrictVersion(check_output(['pip', '--version'])
- and -
command = [python, '-m', 'pip', 'install', '--no-index', '--no-deps', '-U']
TO
command = ['pip', 'install', '--no-index', '--no-deps', '-U']
STEP 3 - RETRY TO UPGRADE CERTBOT-AUTO
(a regular renew action without -no-upgrade will automatically do upgrade)
/data_local/app/cron_shell/lets_encrypt/certbot-auto renew
No comments:
Post a Comment