5
votes

I tried to follow this document, but I have this result:

root@debian:~# apt-get install python-certbot-nginx -t stretch-backports 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.

And when I try to install python3-certbox-nginx:

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-openssl (>= 0.13) but it is not installable Depends: python3-pyparsing (>= 1.5.5) but it is not installable Depends: python3-zope.interface but it is not installable E: Unable to correct problems, you have held broken packages.

I added the backports dep in my sources.list and ran apt-get update.

Here is my sources.list.

python -V says Python 2.7.13, but Python 3 is also installed.

3

3 Answers

0
votes

Do you have the cd-rom?

deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 DVD Binary-1 20180310-11:21]/ stretch contrib main

you could try comment this line and apply a

sudo apt-get update

and try install again python3-certbox-nginx

0
votes

Installing and setting up letsencrypt for nginx with debian 9

sudo apt install python-certbot-nginx

after installing we then run it

sudo certbot --authenticator webroot --installer nginx

Accept the agreement, then select the domain to secure, next input a valid email address tied to the domain, then for the part that asks for the webroot insert..

/var/www/example.com/public

Select option 2 for secure.

After that a free Letsencrypt certificate will have been installed onto the server and is good for three months

Next test it out by going to your browser and typing in https://example.com

After that then add http2 to the /etc/sites-available/example.com at the certbot controlled point like so

listen 443 ssl http2; # managed by Certbot

Then

sudo nginx -t
sudo systemctl restart nginx

Now the server will be serving http2 protocol

This can be verified by using chrome’s net-internals page by pasting the following into a new //tab with your domain loaded in another one.

chrome://net-internals/#http2
0
votes

The instructions you refer to includes another step to add backports https://backports.debian.org/Instructions/

And that page says to add backports to your sources.list. To add deb http://deb.debian.org/debian stretch-backports main to sources.list.

Here is one way to do that and then install certbot...

echo "deb http://deb.debian.org/debian stretch-backports main" | tee -a /etc/apt/sources.list
apt-get update
apt-get install certbot python-certbot-apache -t stretch-backports