Fails to install Python 2.7 packages on letsencrypt renew on AWS instance


Renewing my certificate doesn’t work anymore and I get exit status 1,
I am on Ubuntu 16.04.3 LTS, a Lightsail instance on amazon aws.
The certificate renewal 3 times before, I did install awscli recently which I hope is not causing the issue?

I ran this command: /tmp/letsencrypt/letsencrypt-auto certonly --renew-by-default --webroot --webroot-path <path_to_htdocs_here> -d <domain_name> (I tried with --no-self-upgrade --no-bootstrap too but no help). I just hid the domain name, but if it adds help in tracking the issue then I can include it (I apologize for this in advance)

It produced this output:

My web server is (include version): Running a NodeJS application on AWS Lightsail

The operating system my web server runs on is (include version): Ubuntu 16.04

My hosting provider, if applicable, is: AWS

I can login to a root shell on my machine (yes or no, or I don’t know): Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):

I see that you are calling:

I would try calling it from the same folder:
cd /tmp/letsencrypt

It also shows a lot of packages that are no longer needed.
I would run:
sudo apt-get autoremove
sudo apt autoremove
[or both]

Tried both of the above with the error still there. I saw autoremove removed Python 3 and a number aws related along with others which I hope would have fixed the issue but it didn’t. I tried the option 1 in your response too, but the error remains. I did install awscli few days ago for backups on buckets, other than that I didn’t make any other installation until the last successful renewal I did a couple of months ago. Exactly the same command worked before but not working anymore


I would:

  • backup the LE folder
  • remove cerbot/letsencrypt # if installed
  • remove certbot-auto/letencrypt-auto
  • re-install certbot or certbot-auto # pick only one

[the LE folder should remain in tact throughout - but backups are always good precautions]

If you installed awscli via pip (or anything else, really), it might have done something to your system Python installation.

letsencrypt-auto should work fine on Ubuntu Xenial, so something has gone wrong.

One thing you might try is installing Certbot from the Ubuntu PPA rather than using letencrypt-auto.

1 Like

@rg305 I was in the middle of doing the steps you recommended and saw the link proposed by @_az. Looked straight and easy to use so I tried it and guess what it worked perfectly without any issue. Thanks a lot @_az, your help was just 5 minute work. The link for Certbot installation from Ubuntu PPA worked perfectly. You have saved my life at least twice on this forum. Hats off to you sir


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.