Installing SSL: Apache on Ubuntu 16.04 (xenial)

I’m unable to install the ssl certificate in Apache on Ubuntu 16.04 (xenial). I’m using as reference this tutorial:

https://certbot.eff.org/lets-encrypt/ubuntuxenial-apache

When a I run

$ sudo apt-get install python-certbot-apache

I get the following error:

The following packages have unmet dependencies:
python-certbot-apache : Depends: python3-certbot-apache but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@ubuntu-s-1vcpu-1gb-nyc1-01:~#

If I run python -V, I get Python 2.7.15rc1 If I run python3 -V, I get Python 3.7.0

I’d appreciate the help please.

Did you upgrade from 14.04/14.10 recently?

What does it say when you try to install that one directly?

sudo apt install python3-certbot-apache

No, this is a new droplet I created on Digital Ocean.

When I run it directly, I get

The following packages have unmet dependencies:
python3-certbot-apache : Depends: certbot (>= 0.26.0~) but it is not going to be installed
Depends: python3-certbot but it is not going to be installed
Depends: python3-zope.component but it is not going to be installed
Depends: python3-zope.interface but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I tried following those PPA instructions on a Digital Ocean 16.04 droplet in NYC1 and it succeeded:

root@ubuntu-s-1vcpu-1gb-nyc1-01:~# certbot --version
certbot 0.28.0

It seems like that some other software you installed may be be causing the packaging problem.

I looked over this initially, what do-these show?

apt-mark showhold
dpkg --get-selections | grep hold

I ran root@ubuntu-s-1vcpu-1gb-nyc1-01:~# apt-mark showhold
root@ubuntu-s-1vcpu-1gb-nyc1-01:~# dpkg --get-selections | grep hold

but nothing happened.

Any ideas @schoen :confused:

With those Python versions, it sounds like you're on Ubuntu 18.04 Bionic.

Though installing Certbot should work the same on both...

Are you sure universe is enabled?

The other day, I tried to install Ubuntu 18, but couldn’t complete the task.

I ran a command today and verified universe is enabled.

re"With those Python versions, it sounds like you’re on Ubuntu 1 8 .04 Bionic." How can I just run python 3.7?

What do you mean? Can't you create a new droplet with Ubuntu 18.04 or 18.10 with a few clicks?

How did you get Python 2.7.15rc1 or 3.7.0 on Ubuntu 16.04?

I installed manually 3.7.0

If necessary, I can create a new droplet.

I would ask @bmw about this.

@bmw any ideas you could share please?

Do you mean you tried to do-release-upgrade and aborted it half way?

That could certainly explain things.

1 Like

@_az - yes, I’ll create a new droplet.

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