Installing Certbot on Ubuntu 18.04 problems


#1

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 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:4 http://archive.ubuntu.com/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!


#2

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.


#3

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.


#5

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).


#6

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