My domain is: guraas.com and several others, which already have Let’s Encrypt certificates created with the old packaged certbot (I wish I hadn’t removed it now…)
E: Package ‘python-dev’ has no installation candidate
My web server is (include version):
nginx 1.6.2
The operating system my web server runs on is (include version):
Debian 8.10 Jessie
My hosting provider, if applicable, is:
OVH.nl
I can login to a root shell on my machine (yes or no, or I don’t know):
Yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
No
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):
certbot-auto --version doesn’t work, returns exactly the same output as above
Not officially, although it's not the most common combination.
The most common form is certbot --nginx which expands to certbot run -a nginx -i nginx, which means "use the nginx plugin to obtain a certificate, then install it using the nginx plugin".
Another possible form (as @llanddewi mentioned, that is present in our documentation) is certbot certonly --nginx, which expands to certbot certonly -a nginx, which means "use the nginx plugin to obtain a certificate, then stop".
certbot-auto is trying to install the python-dev package which can be seen in the Jessie repos at Debian -- Error.
You have a lot of 3rd party repositories configured (including jessie-backports which no longer exists and others intended for Ubuntu Xenial). I suspect one of them is masking the python-dev package provided by Debian.
You can maybe find out which repositories are causing the problem by running commands like apt-cache show python and apt-cache show python-dev. Unless it's necessary for other software on your system, I would remove any repositories shown in that output from your apt configuration except for those hosted on debian.org.
That’s great help already, thanks! Yeah, this is an old experimental server, time to start abandoning it…
Anyway, when I run apt-cache show python I think it already becomes clear that it’s this one that’s blocking python-dev, see below. I don’t want to remove python at this time though.
Package: python
Status: install ok installed
Priority: standard
Section: python
Installed-Size: 680
Maintainer: Matthias Klose doko@debian.org
Architecture: amd64
Multi-Arch: allowed
Source: python-defaults
Version: 2.7.9-1
Replaces: python-dev (<< 2.6.5-2)
Provides: python-ctypes, python-email, python-importlib, python-profiler, python-wsgiref
Depends: python2.7 (>= 2.7.9-1~), libpython-stdlib (= 2.7.9-1)
Pre-Depends: python-minimal (= 2.7.9-1)
Suggests: python-doc (= 2.7.9-1), python-tk (>= 2.7.9-1~)
Breaks: update-manager-core (<< 0.200.5-2)
Conflicts: python-central (<< 0.5.5)
Description: interactive high-level object-oriented language (default version)
Python, the high-level, interactive object oriented language,
includes an extensive class library with lots of goodies for
network programming, system administration, sounds and graphics.
.
This package is a dependency package, which depends on Debian’s default
Python version (currently v2.7).
Description-md5: d1ea97f755d8153fe116080f2352859b
Homepage: http://www.python.org/
That’s the python package for Debian Jessie which is not incompatible with python-dev 2.7.9 package for Debian Jessie.
You do not need to remove your Python installation. certbot-auto also needs that. The problem is certbot-auto needs the python-dev package available in Debian Jessie’s repos, but with the way you have apt configured, apt is not able to find the package.
If you can modify your apt configuration under /etc/apt so you can successfully run sudo apt-get install python-dev, you should no longer hit this problem.