Following instructions on here https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx I tried to run this command:
sudo apt-get install python-certbot-nginx
But I get the following error:
~$sudo apt-get install python-certbot-nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python-certbot-nginx : Depends: python3-certbot-nginx but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Attempting to install python3-certbot-nginx shows a few further details:
~$ sudo apt-get install python3-certbot-nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-certbot-nginx : Depends: certbot (>= 0.25.0~) but it is not going to be installed
Depends: python3-acme but it is not going to be installed
Depends: python3-certbot but it is not going to be installed
Depends: python3-mock but it is not installable
Depends: python3-pyparsing (>= 1.5.5) but it is not installable
E: Unable to correct problems, you have held broken packages.
I ran sudo apt upgrade
and several things were upgraded, but I still got the same error. The upgrade command refused to upgrade these three items: liblxc1, lxd, lxd-client
(not sure why)
I then tried to use the certbot-auto tool, and seemed to run into a similar problem:
~$ wget https://dl.eff.org/certbot-auto
~$ chmod a+x ./certbot-auto
~$ sudo ./certbot-auto --install-only
Bootstrapping dependencies for Debian-based OSes... (you can skip this with --no-bootstrap)
Hit:1 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease
Hit:2 http://azure.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:4 https://repos.influxdata.com/ubuntu xenial InRelease
Hit:5 https://nginx.org/packages/mainline/ubuntu xenial InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package gcc 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
However the following packages replace it:
gcc-5-doc
Package libffi-dev 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
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
Package python-dev 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
However the following packages replace it:
python
E: Package 'python-dev' has no installation candidate
E: Package 'python-virtualenv' has no installation candidate
E: Package 'gcc' has no installation candidate
E: Package 'libffi-dev' has no installation candidate
I'm not sure where to go from here. Any idea why this is happening and how to resolve the issue?