Installing Certbot on Debian 8 - OS Package Manager Not Installing Certbot

Please fill out the fields below so we can help you better.

My domain is:
not relevant

I ran this command:
sudo apt-get install certbot -t jessie-backports
It produced this output:
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:
certbot : Depends: python-certbot (= 0.9.3-1~bpo8+2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@vserver6:~# sudo apt-get install certbot -t jessie-backports -f
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:
certbot : Depends: python-certbot (= 0.9.3-1~bpo8+2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

My operating system is (include version):
Linux xxx.ch 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux

My web server is (include version):
Not relevant
My hosting provider, if applicable, is:
Not relevant

Dear all,
I read several alike error descriptions but no solution helps in my case.
To explain the problem:

root@server:~# cat /etc/apt/sources.list

deb http://ftp.de.debian.org/debian/ jessie main
deb-src http://ftp.de.debian.org/debian/ jessie main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

deb http://ftp.de.debian.org/debian/ jessie-updates main
deb-src http://ftp.de.debian.org/debian/ jessie-updates main

deb http://ftp.debian.org/debian jessie-backports main

Now updating apt
root@server:~# apt update
Hit http://security.debian.org jessie/updates InRelease
Ign http://ftp.de.debian.org jessie InRelease
Hit http://ftp.debian.org jessie-backports InRelease
Hit http://ftp.de.debian.org jessie-updates InRelease
Hit http://ftp.de.debian.org jessie Release.gpg
Hit http://ftp.de.debian.org jessie Release
Hit http://security.debian.org jessie/updates/main Sources
Hit http://security.debian.org jessie/updates/main amd64 Packages
Get:1 http://ftp.debian.org jessie-backports/main amd64 Packages/DiffIndex [27.8 kB]
Hit http://security.debian.org jessie/updates/main Translation-en
Get:2 http://ftp.debian.org jessie-backports/main Translation-en/DiffIndex [27.8 kB]
Hit http://ftp.de.debian.org jessie-updates/main Sources
Get:3 http://ftp.de.debian.org jessie-updates/main amd64 Packages/DiffIndex [7,408 B]
Get:4 http://ftp.de.debian.org jessie-updates/main Translation-en/DiffIndex [2,704 B]
Hit http://ftp.de.debian.org jessie/main Sources
Hit http://ftp.de.debian.org jessie/main amd64 Packages
Hit http://ftp.de.debian.org jessie/main Translation-en
Hit http://ftp.de.debian.org jessie/main Translation-de
Fetched 65.7 kB in 2s (25.7 kB/s)
Reading package lists… Done
Building dependency tree
Reading state information… Done
All packages are up to date.

Now installing from backports
root@server:~# sudo apt-get install certbot -t jessie-backports -f
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:
 certbot : Depends: python-certbot (= 0.9.3-1~bpo8+2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

So the question is - what is wrong. As far I can see it should work according to instructions.

Hi @iggs0

If this is not the issue let us know

There are a couple of other ways of installing certbot

https://certbot.eff.org/docs/install.html#alternate-installation-methods

Certbot-Auto

The certbot-auto wrapper script installs Certbot, obtaining some dependencies from your web server OS and putting others in a python virtual environment. You can download and run it as follows:

user@webserver:~$ wget https://dl.eff.org/certbot-auto
user@webserver:~$ chmod a+x ./certbot-auto
user@webserver:~$ ./certbot-auto --help

Andrei

Hi Andrei,

the Issue mentioned by you does not apply. As you can see I got backports configured. It just breaks due to dependencies.

Regards download an shellscript an executing it. Thanks - but no thanks.
I´m not the person who will wget and execute something with root rights. This can not be the solution.
There is a package - but something seems to be not right.

I think this is the Issue which needs to be resolved.
best regards

Dirk

Greetings,

I’m running into the same issue - backports is enabled, repositories are updated, but certbot fails to install due to the same dependency issues as Dirk experienced.

$ sudo apt-get -t jessie-backports install certbot
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:
 certbot : Depends: python-certbot (= 0.9.3-1~bpo8+2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Which leads to…

$ sudo apt-get -t jessie-backports install python-certbot
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 : Depends: python-acme (>= 0.9.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Which leads to…

$ sudo apt-get -t jessie-backports install python-acme
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  python-cffi-backend python-cryptography python-dnspython python-enum34 python-funcsigs python-idna python-ipaddress python-mock python-ndg-httpsclient python-openssl python-pbr python-pyasn1 python-requests
  python-rfc3339 python-tz python-urllib3
Suggested packages:
  python-acme-doc python-cryptography-doc python-cryptography-vectors python-enum34-doc python-funcsigs-doc python-mock-doc python-openssl-doc python-openssl-dbg doc-base python-socks python-ntlm
The following NEW packages will be installed:
  python-acme python-cffi-backend python-cryptography python-dnspython python-enum34 python-funcsigs python-idna python-ipaddress python-mock python-ndg-httpsclient python-openssl python-pbr python-pyasn1
  python-requests python-rfc3339 python-tz python-urllib3
0 upgraded, 17 newly installed, 0 to remove and 68 not upgraded.
Need to get 0 B/917 kB of archives.
After this operation, 5,228 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package python-cffi-backend.
(Reading database ... 47280 files and directories currently installed.)
Preparing to unpack .../python-cffi-backend_1.4.2-2~bpo8+1_i386.deb ...
Unpacking python-cffi-backend (1.4.2-2~bpo8+1) ...
Selecting previously unselected package python-enum34.
Preparing to unpack .../python-enum34_1.0.3-1_all.deb ...
Unpacking python-enum34 (1.0.3-1) ...
Selecting previously unselected package python-idna.
Preparing to unpack .../python-idna_2.0-3~bpo8+1_all.deb ...
Unpacking python-idna (2.0-3~bpo8+1) ...
Selecting previously unselected package python-ipaddress.
Preparing to unpack .../python-ipaddress_1.0.16-1~bpo8+1_all.deb ...
Unpacking python-ipaddress (1.0.16-1~bpo8+1) ...
Selecting previously unselected package python-pyasn1.
Preparing to unpack .../python-pyasn1_0.1.9-1~bpo8+1_all.deb ...
Unpacking python-pyasn1 (0.1.9-1~bpo8+1) ...
Selecting previously unselected package python-cryptography.
Preparing to unpack .../python-cryptography_1.3.4-1~bpo8+2_i386.deb ...
Unpacking python-cryptography (1.3.4-1~bpo8+2) ...
Selecting previously unselected package python-dnspython.
Preparing to unpack .../python-dnspython_1.15.0-1~bpo8+1_all.deb ...
Unpacking python-dnspython (1.15.0-1~bpo8+1) ...
Selecting previously unselected package python-funcsigs.
Preparing to unpack .../python-funcsigs_1.0.2-3~bpo8+1_all.deb ...
Unpacking python-funcsigs (1.0.2-3~bpo8+1) ...
Selecting previously unselected package python-openssl.
Preparing to unpack .../python-openssl_16.0.0-1~bpo8+1_all.deb ...
Unpacking python-openssl (16.0.0-1~bpo8+1) ...
Selecting previously unselected package python-ndg-httpsclient.
Preparing to unpack .../python-ndg-httpsclient_0.4.2-1~bpo8+1_all.deb ...
Unpacking python-ndg-httpsclient (0.4.2-1~bpo8+1) ...
Selecting previously unselected package python-pbr.
Preparing to unpack .../python-pbr_1.8.0-4.1~bpo8+1_all.deb ...
Unpacking python-pbr (1.8.0-4.1~bpo8+1) ...
Selecting previously unselected package python-urllib3.
Preparing to unpack .../python-urllib3_1.16-1~bpo8+1_all.deb ...
Unpacking python-urllib3 (1.16-1~bpo8+1) ...
Selecting previously unselected package python-requests.
Preparing to unpack .../python-requests_2.11.1-1~bpo8+1_all.deb ...
Unpacking python-requests (2.11.1-1~bpo8+1) ...
Selecting previously unselected package python-tz.
Preparing to unpack .../python-tz_2012c+dfsg-0.1_all.deb ...
Unpacking python-tz (2012c+dfsg-0.1) ...
Selecting previously unselected package python-rfc3339.
Preparing to unpack .../python-rfc3339_1.0-4~bpo8+1_all.deb ...
Unpacking python-rfc3339 (1.0-4~bpo8+1) ...
Selecting previously unselected package python-mock.
Preparing to unpack .../python-mock_2.0.0-3~bpo8+1_all.deb ...
Unpacking python-mock (2.0.0-3~bpo8+1) ...
Selecting previously unselected package python-acme.
Preparing to unpack .../python-acme_0.10.2-1~bpo8+1_all.deb ...
Unpacking python-acme (0.10.2-1~bpo8+1) ...
Processing triggers for man-db (2.7.0.2-5) ...
/usr/bin/mandb: can't open /usr/local/man/man1/duplicity.1: Permission denied
Setting up python-cffi-backend (1.4.2-2~bpo8+1) ...
Setting up python-enum34 (1.0.3-1) ...
Setting up python-idna (2.0-3~bpo8+1) ...
Setting up python-ipaddress (1.0.16-1~bpo8+1) ...
Setting up python-pyasn1 (0.1.9-1~bpo8+1) ...
Setting up python-cryptography (1.3.4-1~bpo8+2) ...
Setting up python-dnspython (1.15.0-1~bpo8+1) ...
Setting up python-funcsigs (1.0.2-3~bpo8+1) ...
Setting up python-openssl (16.0.0-1~bpo8+1) ...
Setting up python-ndg-httpsclient (0.4.2-1~bpo8+1) ...
Setting up python-pbr (1.8.0-4.1~bpo8+1) ...
update-alternatives: using /usr/bin/python2-pbr to provide /usr/bin/pbr (pbr) in auto mode
Setting up python-urllib3 (1.16-1~bpo8+1) ...
Setting up python-requests (2.11.1-1~bpo8+1) ...
Setting up python-tz (2012c+dfsg-0.1) ...
Setting up python-rfc3339 (1.0-4~bpo8+1) ...
Setting up python-mock (2.0.0-3~bpo8+1) ...
Setting up python-acme (0.10.2-1~bpo8+1) ...

At which point, python-acme 0.10.2-1 is installed, yet python-cerbot still fails:

$ sudo apt-get -t jessie-backports install python-certbot
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 : Depends: python-acme (>= 0.9.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Considering that sudo apt-get -t jessie-backports install certbot is the prominently specified installation method on certbot.eff.org, it’d be worth finding out why this is occurring. Thanks!

-Nikhil

Hi,

I’m having the same problem for 5-6 hours now. I guess it’s another occurrence of this and having this issue frequently is hard to manage if you build virtual machine images for continuous delivery and rely on a stable backports repository for installing certbot. Using certbot-auto also does not work, this time because of a failing dependency on libssl-dev.

Best

Hello,

It seems like python-acme in Debian Jessie bpo repo was updated recently, which broke some dep-chains. I ran into the same issue nikhilc describes simply doing a routine apt-get upgrade / dist-upgrade. This is what I did to get certbot (re)installed, at least as a temporary solution:

apt-get remove python-acme
wget http://ftp.us.debian.org/debian/pool/main/p/python-acme/python-acme_0.9.3-1~bpo8+1_all.deb
dpkg -i python-acme_0.9.3-1~bpo8+1_all.deb
apt-get install certbot -t jessie-backports
apt-mark hold python-acme

Note that this is a temporary solution and your mileage may vary. After the bpo dep-chain is unbroken w/r/t python-acme, python-certbot, and certbot, you’ll probably want to:

apt-mark unhold python-acme

And reinstall / upgrade as normal.

4 Likes

Hello @nikhilc @cagatay,

Seems that jessie backports packages are broken, certbot (0.9.3-1~bpo8+2) depends on python-certbot (=0.9.3-1~bpo8+2) and python-certbot depends on python-acme (>= 0.9.3) but updated python-acme breaks python-certbot (<< 0.10.2) so seems there is a bit mess on these dependencies.

I don’t know whether the maintainer of Debian certbot package is still here around us, if so, @hlieberman, if you are still the Debian maintainer for certbot package, could you please take a look to this issue?.

Thank you.

Cheers,
sahsanu

Hi,
there is a bug in the debian tracker, if you are interested you can look at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861269

2 Likes

@came88, thanks for the link to the open bug, so yes, maintainer knows the issue and it will be resolved soon.

From the bug:

It should resolve automatically when the rest of the certbot packages
migrate.

This sounds like there will be no immediate solution. No? Hoping for the best.

Hi @kghbln,
you can try the workaround proposed by @natenate19 while the bug gets resolved.

Lorenzo

Yeah, cool workaround! Will wait for a couple of days though. Perhaps in the meantime …

This worked for me. Thanks a lot!

1 Like

The 0.9.3 workaround also worked here, thanks!

The workaround is no longer required. Debian bug 861269 was resolved. After doing apt-get update followed by apt-get install python-certbot-apache -t jessie-backports on my Debian 8 things got back installed on the machine and I was successfully able to test the environment with certbot renew --dry-run

1 Like

Bug resolved, thanks to developers.

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