Installing Certbot on Ubuntu 18.04 problems

I ran this command:
sudo certbot-auto --apache -d MYDOMAIN

It produced this output:

Bootstrapping dependencies for Debian-based OSes... (you can skip this with --no-bootstrap)
Hit:1 Index of /certbot/certbot/ubuntu bionic InRelease
Hit:2 Index of /ubuntu bionic InRelease
Hit:3 Index of /ubuntu bionic-security InRelease
Hit:4 Index of /ubuntu bionic-updates InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-virtualenv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-virtualenv' has no installation candidate

My web server is (include version):

Server version: Apache/2.4.29 (Ubuntu)

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

Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04

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

I have tried to install the python-virtualenv but can't. Any help would be great!

Do you have the universe repository enabled?

https://packages.ubuntu.com/bionic/python-virtualenv

https://help.ubuntu.com/community/Repositories/Ubuntu

Regardless, you can install Certbot from the PPA instead of using certbot-auto.

1 Like

Yup! That was the problem.
I added the following line to /etc/apt/sources.list:

deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe

It installed correctly after that.

You probably shouldn't be putting Trusty into Bionic. I was able to get it to work by changing my first line of sources.list which originally read

deb http://archive.ubuntu.com/ubuntu bionic main 

into

deb http://archive.ubuntu.com/ubuntu bionic main restricted universe

and then running

apt-get update

and finally

apt-get install certbot

This needs to be documented on the installation pages! Even adding the PPA to 18.04 didn't work, I would consistently get errors about broken/held packages (despite the fact I was on a fresh, pristine install of 18.04 with no held packages).

3 Likes

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