# Website Crash after update AWS Lightsail Bitnami Unmet dependencies between 0.28.0 and 0.31.0

**URL:** <https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989>\
**Category:** Help\
**Created:** [May 20, 2019, 8:41am UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989 "2019-05-20T08:41:37Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sllyders](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sllyders](https://community.letsencrypt.org/u/sllyders)\
**Post date:** [May 20, 2019, 8:41am UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989/1 "2019-05-20T08:41:37Z")

</div>

Hi there,

I was trying to renew my certificate and I ran a few commands below:

[https://lightsail.aws.amazon.com/ls/docs/en\_us/articles/amazon-lightsail-using-lets-encrypt-certificates-with-wordpress](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-using-lets-encrypt-certificates-with-wordpress)

Now my website is down, looks like that I could renew the certificate but something went wrong during the updates.

My domain is: tabledirect . com . au

I ran this command: sudo apt install certbot

It produced this output:

Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
Suggested packages:  
python3-certbot-nginx python-certbot-doc  
The following packages will be upgraded:  
certbot  
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  
Need to get 0 B/11.0 kB of archives.  
After this operation, 1,024 B of additional disk space will be used.  
(Reading database … 139904 files and directories currently installed.)  
Preparing to unpack …/certbot\_0.31.0-1+ubuntu16.04.1+certbot+1\_all.deb …  
Failed to stop certbot.service: Unit certbot.service not loaded.  
dpkg: warning: subprocess old pre-removal script returned error exit status 5  
dpkg: trying script from the new package instead …  
Failed to stop certbot.service: Unit certbot.service not loaded.  
dpkg: error processing archive /var/cache/apt/archives/certbot\_0.31.0-1+ubuntu16.04.1+certb  
ot+1\_all.deb (–unpack):  
subprocess new pre-removal script returned error exit status 5  
certbot.service is a disabled or a static unit, not starting it.  
Job for certbot.timer failed. See “systemctl status certbot.timer” and “journalctl -xe” for  
details.  
certbot.timer couldn’t start.  
Errors were encountered while processing:  
/var/cache/apt/archives/certbot\_0.31.0-1+ubuntu16.04.1+certbot+1\_all.deb  
E: Sub-process /usr/bin/dpkg returned an error code (1)

My web server is (include version): Amazon Lightsail

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

I can login to a root shell on my machine.

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):  
When I run certbot --version:

raceback (most recent call last):  
File “/usr/lib/python3/dist-packages/pkg\_resources/ **init**.py”, line 655, in \_build\_mast  
er  
ws.require( **requires** )  
File “/usr/lib/python3/dist-packages/pkg\_resources/ **init**.py”, line 963, in require  
needed = self.resolve(parse\_requirements(requirements))  
File “/usr/lib/python3/dist-packages/pkg\_resources/ **init**.py”, line 854, in resolve  
raise VersionConflict(dist, req).with\_context(dependent\_req)  
pkg\_resources.VersionConflict: (certbot 0.31.0 (/usr/lib/python3/dist-packages), Requiremen  
t.parse(‘certbot==0.28.0’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/usr/bin/certbot”, line 6, in   
from pkg\_resources import load\_entry\_point  
File “/usr/lib/python3/dist-packages/pkg\_resources/ **init**.py”, line 3019, in   
@\_call\_aside  
File “/usr/lib/python3/dist-packages/pkg\_resources/ **init**.py”, line 3003, in \_call\_asid  
e  
f(\*args, \*\*kwargs)  
File “/usr/lib/python3/dist-packages/pkg\_resources/ **init**.py”, line 3032, in \_initializ  
e\_master\_working\_set  
working\_set = WorkingSet.\_build\_master()  
File “/usr/lib/python3/dist-packages/pkg\_resources/ **init**.py”, line 657, in \_build\_mast  
er  
return cls.\_build\_from\_requirements( **requires** )  
File “/usr/lib/python3/dist-packages/pkg\_resources/ **init**.py”, line 670, in \_build\_from  
\_requirements  
dists = ws.resolve(reqs, Environment())  
File “/usr/lib/python3/dist-packages/pkg\_resources/ **init**.py”, line 849, in resolve  
raise DistributionNotFound(req, requirers)  
pkg\_resources.DistributionNotFound: The ‘certbot==0.28.0’ distribution was not found and is  
required by the application

Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
You might want to run ‘apt-get -f install’ to correct these.  
**The following packages have unmet dependencies:**  
\*\* certbot : Depends: python3-certbot (= 0.28.0-1+ubuntu16.04.1+certbot+4) but 0.31.0-1+ubunt\*\*  
**u16.04.1+certbot+1 is installed**  
**E: Unmet dependencies.**

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![sllyders](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sllyders](https://community.letsencrypt.org/u/sllyders)\
**Post date:** [May 20, 2019, 9:18am UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989/2 "2019-05-20T09:18:27Z")

</div>

bitnami@ip-172-26-12-60:~$ **dpkg -l | grep certbot**

ii **certbot 0.28.0-1+ubuntu16.04.1+certbot+4 all**  
automatically configure HTTPS using Let’s Encrypt  
ii **python-certbot-apache 0.31.0-1+ubuntu16.04.1+certbot+1 all**  
transitional dummy package  
ii python-pkg-resources 33.1.1-1+certbot~xenial+1 all  
Package Discovery and Resource Access using pkg\_resources  
ii python3-acme 0.31.0-1+ubuntu16.04.1+certbot+1 all  
ACME protocol library for Python 3  
ii python3-asn1crypto 0.22.0-2+ubuntu16.04.1+certbot+1 all  
Fast ASN.1 parser and serializer (Python 3)  
ii python3-augeas 0.5.0-1+ubuntu16.04.1+certbot+1 all  
Python3 bindings for Augeas  
ii **python3-certbot 0.31.0-1+ubuntu16.04.1+certbot+1 all**  
main library for certbot  
ii python3-certbot-apache 0.31.0-1+ubuntu16.04.1+certbot+1 all  
Apache plugin for Certbot  
ii python3-certifi 2017.4.17-2+ubuntu16.04.1+certbot+1 all  
root certificates for validating SSL certs and verifying TLS hosts (python3)  
ii python3-cffi-backend 1.10.0-0.1+ubuntu16.04.1+certbot+1 amd64  
Foreign Function Interface for Python 3 calling C code - runtime  
ii python3-chardet 3.0.4-1+ubuntu16.04.1+certbot+2 all  
universal character encoding detector for Python3  
ii python3-configargparse 0.11.0-1+certbot~xenial+1 all  
replacement for argparse with config files and environment variables (Python 3)  
ii python3-configobj 5.0.6-2+ubuntu16.04.1+certbot+1 all  
simple but powerful config file reader and writer for Python 3  
ii python3-cryptography 1.9-1+ubuntu16.04.1+certbot+2 amd64  
Python library exposing cryptographic recipes and primitives (Python 3)  
ii python3-future 0.15.2-4+ubuntu16.04.1+certbot+3 all  
Clean single-source support for Python 3 and 2 - Python 3.x  
ii python3-idna 2.5-1+ubuntu16.04.1+certbot+1 all  
Python IDNA2008 (RFC 5891) handling (Python 3)  
ii python3-josepy 1.1.0-2+ubuntu16.04.1+certbot+1 all  
JOSE implementation for Python 3.x  
ii python3-ndg-httpsclient 0.4.2-1+certbot~xenial+1 all  
enhanced HTTPS support for httplib and urllib2 using PyOpenSSL for Python3  
ii python3-openssl 17.3.0-1~0+ubuntu16.04.1+certbot+1 all  
Python 3 wrapper around the OpenSSL library  
ii python3-parsedatetime 2.4-3+ubuntu16.04.1+certbot+3 all  
Python 3 module to parse human-readable date/time expressions  
ii python3-pkg-resources 33.1.1-1+certbot~xenial+1 all  
Package Discovery and Resource Access using pkg\_resources  
ii python3-pyasn1 0.1.9-2+certbot~xenial+1 all  
ASN.1 library for Python (Python 3 module)

---

<div class="post-metadata">

**Author:** ![Phil](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/phil/32/76801_2.png) [@Phil](https://community.letsencrypt.org/u/Phil)\
**Post date:** [May 20, 2019, 3:12pm UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989/3 "2019-05-20T15:12:12Z")

</div>

Hi @sllyders,

Welcome to the community forum!

The following commands should help cleanup the previous failed installation.

```auto
sudo apt-get purge certbot
sudo apt-get autoremove

```

Ensure you have the latest packages available for your system

```auto
sudo apt-get update
sudo apt-get upgrade

```

Let us know if the following the installation steps from [https://certbot.eff.org/lets-encrypt/ubuntuxenial-other](https://certbot.eff.org/lets-encrypt/ubuntuxenial-other) actually get certbot installed.

```auto
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot

```

Following these commands on a fresh docker container running `ubuntu:xenial` allowed me to successfully run certbot 0.31.0.

```auto
root@216cf9c02886:/# certbot --version
certbot 0.31.0
root@216cf9c02886:/# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.6 LTS
Release:	16.04
Codename:	xenial

```

---

<div class="post-metadata">

**Author:** ![sllyders](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sllyders](https://community.letsencrypt.org/u/sllyders)\
**Post date:** [May 20, 2019, 3:42pm UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989/4 "2019-05-20T15:42:27Z")

</div>

When I run: sudo apt-get purge certbot

I have:  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
The following packages were automatically installed and are no longer required:  
apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1  
libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 python3-acme python3-augeas  
python3-certbot python3-configargparse python3-funcsigs python3-future python3-icu  
python3-josepy python3-mock python3-ndg-httpsclient python3-parsedatetime python3-pbr  
python3-requests-toolbelt python3-rfc3339 python3-tz python3-zope.component  
python3-zope.event python3-zope.hookable python3-zope.interface ssl-cert  
Use ‘sudo apt autoremove’ to remove them.  
The following packages will be REMOVED:  
certbot\*  
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.  
1 not fully installed or removed.  
After this operation, 38.9 kB disk space will be freed.  
Do you want to continue? [Y/n] y  
(Reading database … 143901 files and directories currently installed.)  
Removing certbot (0.28.0-1+ubuntu16.04.1+certbot+4) …  
Failed to stop certbot.service: Unit certbot.service not loaded.  
dpkg: error processing package certbot (–purge):  
subprocess installed pre-removal script returned error exit status 5  
certbot.service is a disabled or a static unit, not starting it.  
certbot.timer is a disabled or a static unit, not starting it.  
Errors were encountered while processing:  
certbot  
E: Sub-process /usr/bin/dpkg returned an error code (1)

**~$ sudo apt-get autoremove**  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
You might want to run ‘apt-get -f install’ to correct these.  
The following packages have unmet dependencies:  
certbot : Depends: python3-certbot (= 0.28.0-1+ubuntu16.04.1+certbot+4) but 0.31.0-1+ubun  
tu16.04.1+certbot+1 is installed  
E: Unmet dependencies. Try using -f.

I did update and upgrade too.

I followed the steps and I have these problems:

sudo apt-get install software-properties-common

---

<div class="post-metadata">

**Author:** ![sllyders](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sllyders](https://community.letsencrypt.org/u/sllyders)\
**Post date:** [May 20, 2019, 3:43pm UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989/5 "2019-05-20T15:43:39Z")

</div>

bitnami@ip-172-26-12-60:~ sudo apt-get install software-properties-common Reading package lists... Done Building dependency tree Reading state information... Done software-properties-common is already the newest version (0.96.20.8). You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: certbot : Depends: python3-certbot (= 0.28.0-1+ubuntu16.04.1+certbot+4) but 0.31.0-1+ubun tu16.04.1+certbot+1 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). bitnami@ip-172-26-12-60:~ Reading package lists… Done  
Reading: command not found  
bitnami@ip-172-26-12-60:~ Building dependency tree Building: command not found bitnami@ip-172-26-12-60:~ Reading state information… Done  
Reading: command not found  
bitnami@ip-172-26-12-60:~ software-properties-common is already the newest version (0.96. 20.8). -bash: syntax error near unexpected token `(' bitnami@ip-172-26-12-60:~ You might want to run ‘apt-get -f install’ to correct these:  
You: command not found  
bitnami@ip-172-26-12-60:~ The following packages have unmet dependencies: No command 'The' found, did you mean: Command 'the' from package 'the' (universe) The: command not found bitnami@ip-172-26-12-60:~ certbot : Depends: python3-certbot (= 0.28.0-1+ubuntu16.04.1+c  
ertbot+4) but 0.31.0-1+ubun  
-bash: syntax error near unexpected token `(’  
bitnami@ip-172-26-12-60:~ tu16.04.1+certbot+1 is to be installed tu16.04.1+certbot+1: command not found bitnami@ip-172-26-12-60:~ E: Unmet dependencies. Try ‘apt-get -f install’ with no package

---

<div class="post-metadata">

**Author:** ![sllyders](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sllyders](https://community.letsencrypt.org/u/sllyders)\
**Post date:** [May 20, 2019, 3:49pm UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989/6 "2019-05-20T15:49:48Z")

</div>

bitnami@ip-172-26-12-60:~$ **sudo apt-get install certbot**  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
The following packages were automatically installed and are no longer required:  
apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1  
libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 python3-augeas ssl-cert  
Use ‘sudo apt autoremove’ to remove them.  
Suggested packages:  
python3-certbot-apache python3-certbot-nginx python-certbot-doc  
The following packages will be upgraded:  
certbot  
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  
1 not fully installed or removed.  
Need to get 0 B/11.0 kB of archives.  
After this operation, 1,024 B of additional disk space will be used.  
Selecting previously unselected package certbot.  
(Reading database … 143901 files and directories currently installed.)  
Preparing to unpack …/certbot\_0.31.0-1+ubuntu16.04.1+certbot+1\_all.deb …  
Failed to stop certbot.service: Unit certbot.service not loaded.  
dpkg: warning: subprocess old pre-removal script returned error exit status 5  
dpkg: trying script from the new package instead …  
Failed to stop certbot.service: Unit certbot.service not loaded.  
dpkg: error processing archive /var/cache/apt/archives/certbot\_0.31.0-1+ubuntu16.04.1+cert  
bot+1\_all.deb (–unpack):  
subprocess new pre-removal script returned error exit status 5  
certbot.service is a disabled or a static unit, not starting it.  
certbot.timer is a disabled or a static unit, not starting it.  
Errors were encountered while processing:  
/var/cache/apt/archives/certbot\_0.31.0-1+ubuntu16.04.1+certbot+1\_all.deb  
E: Sub-process /usr/bin/dpkg returned an error code (1)

---

<div class="post-metadata">

**Author:** ![Phil](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/phil/32/76801_2.png) [@Phil](https://community.letsencrypt.org/u/Phil)\
**Post date:** [May 20, 2019, 3:55pm UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989/7 "2019-05-20T15:55:13Z")

</div>

@sllyders

Let’s try to clean up the system state by rebuilding the dpkg database.

```auto
sudo dpkg --configure -a
sudo apt-get install -f

```

---

<div class="post-metadata">

**Author:** ![sllyders](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sllyders](https://community.letsencrypt.org/u/sllyders)\
**Post date:** [May 20, 2019, 4:02pm UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989/8 "2019-05-20T16:02:07Z")

</div>

Thanks Phil but did not work:

bitnami@ip-172-26-12-60:~$ **sudo dpkg --configure -a**  
Setting up python3-certbot (0.31.0-1+ubuntu16.04.1+certbot+1) …

bitnami@ip-172-26-12-60:~$ **sudo apt-get install -f**  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
Correcting dependencies… Done  
The following packages were automatically installed and are no longer required:  
apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1  
libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 python3-augeas ssl-cert  
Use ‘sudo apt autoremove’ to remove them.  
The following additional packages will be installed:  
certbot  
Suggested packages:  
python3-certbot-apache python3-certbot-nginx python-certbot-doc  
The following packages will be upgraded:  
certbot  
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  
Need to get 0 B/11.0 kB of archives.  
After this operation, 1,024 B of additional disk space will be used.  
Do you want to continue? [Y/n] y  
(Reading database … 143901 files and directories currently installed.)  
Preparing to unpack …/certbot\_0.31.0-1+ubuntu16.04.1+certbot+1\_all.deb …  
Failed to stop certbot.service: Unit certbot.service not loaded.  
dpkg: warning: subprocess old pre-removal script returned error exit status 5  
dpkg: trying script from the new package instead …  
Failed to stop certbot.service: Unit certbot.service not loaded.  
dpkg: error processing archive /var/cache/apt/archives/certbot\_0.31.0-1+ubuntu16.04.1+cert  
bot+1\_all.deb (–unpack):  
subprocess new pre-removal script returned error exit status 5  
certbot.service is a disabled or a static unit, not starting it.  
certbot.timer is a disabled or a static unit, not starting it.  
Errors were encountered while processing:  
/var/cache/apt/archives/certbot\_0.31.0-1+ubuntu16.04.1+certbot+1\_all.deb  
E: Sub-process /usr/bin/dpkg returned an error code (1)

---

<div class="post-metadata">

**Author:** ![sllyders](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sllyders](https://community.letsencrypt.org/u/sllyders)\
**Post date:** [May 20, 2019, 5:32pm UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989/9 "2019-05-20T17:32:24Z")

</div>

I don’t know if helps:

bitnami@ip-172-26-12-60:~$ **systemctl status certbot.service**  
● certbot.service - Certbot  
Loaded: error (Reason: Invalid argument)  
Active: inactive (dead)  
Docs: [https://letsencrypt.readthedocs.io/en/latest/](https://letsencrypt.readthedocs.io/en/latest/)

May 20 16:49:53 ip-172-26-12-60 systemd[1]: [/etc/systemd/system/certbot.service:7] Execut  
May 20 16:49:53 ip-172-26-12-60 systemd[1]: certbot.service: Service lacks both ExecStart=

---

<div class="post-metadata">

**Author:** ![Phil](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/phil/32/76801_2.png) [@Phil](https://community.letsencrypt.org/u/Phil)\
**Post date:** [May 20, 2019, 8:12pm UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989/10 "2019-05-20T20:12:04Z")

</div>

@sllyders

Since the package is in a funky state, let’s remove that. The working certbot package should reinstall that file.

```auto
# Find any old crufty unit files or timers
systemctl list-units | grep certbot
systemctl list-timers | grep certbot

# Remove the old unit file/timer if they exist
stat /lib/systemd/system/certbot.service
stat /lib/systemd/system/certbot.timer
ls -al /etc/systemd/system/ | grep certbot

# You can issue the rm commands to remove those files

# Reload systemd
sudo systemd daemon-reload

```

---

<div class="post-metadata">

**Author:** ![sllyders](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@sllyders](https://community.letsencrypt.org/u/sllyders)\
**Post date:** [May 24, 2019, 12:00pm UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989/11 "2019-05-24T12:00:33Z")

</div>

Hi Phil, did work!

After that I could install the final version of the certbot.

Unfortunately, I messed with the .conf files, so I end up reinstalling the server.

Thanks so much for your help.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [June 23, 2019, 12:06pm UTC](https://community.letsencrypt.org/t/website-crash-after-update-aws-lightsail-bitnami-unmet-dependencies-between-0-28-0-and-0-31-0/93989/12 "2019-06-23T12:06:31Z")

</div>

Closed on June 23, 2019, 12:06pm UTC

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