Unable to install certbot-auto on Debian Wheezy

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

My domain is:
Debian Wheezy

I ran this command:
./certbot-auto --apache

It produced this output:

Following packages have dependencies that cant be satisfied:
libssl-dev : Dependent of: zlib1g-dev but it wont be installed
python-dev : Dependent of: python2.7-dev (>= but it wont be installed
E: Couldn’t correct the problem, you have broken packages.

(Roughly translated, I use Swedish OS)

My operating system is (include version):

Distributor ID: Debian
Description: Debian GNU/Linux 7.11 (wheezy)
Release: 7.11
Codename: wheezy

My web server is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):

Is there anyone who could help me?

Hi @feeloor,

Seems your system packages are a bit broken. I’m answering this post because I don’t like to see unanswered posts but I also don’t like to advice people to issue commands that could mess its system and yours seems that has packages issues that could bring down your system if you try to fix it, so be careful

Could you please show the contents of your sources.list?.

cat /etc/apt/sources.list

If you have files in /etc/apt/sources.list.d/

ls -la /etc/apt/sources.list.d/

and if any, perform this command to show the contents of all of them:

for i in $(ls /etc/apt/sources.list.d/);do echo "Showing file ${i}:";cat "/etc/apt/sources.list.d/${i}";echo;done

Also, show the output of the following command:

apt-cache policy libssl-dev zlib1g-dev python-dev python2.7-dev

And again, the output of:

apt-get update

and now, what happens when you try to upgrade your system?:


Let’s see if we can fix your issues.

Note: If you put any output in this post, copy from your terminal, paste it in the new message, select that output in the new message edit box and click on the icon </> so the output will be shown unaltered.



Thank you very much for taking your time to help me.

Here is a pastebin of my “sources.list” (I wasn’t able to paste it pretty in here): https://pastebin.com/b0p18sAh

Here is a pastebin of my files in /etc/apt/sources.list.d: https://pastebin.com/ExErXhfx

Pastebin from “apt-cache policy libssl-dev zlib1g-dev python-dev python2.7-dev”: https://pastebin.com/yxiDsA0K

Pastebin from “apt-get update”: https://pastebin.com/sKv80GwK

Pastebin from “apt-get upgrade”: https://pastebin.com/UjzM1Vs7

Hope it’s okey that I used pastebin’s instead.

Thanks again for taking your time.

Hi @feeloor,

Sure, no problem ;).

Ok, lets try to install one of the packages (show the output of both commands):

export LANG=C; apt-get install zlib1g-dev

And the other one:

export LANG=C; apt-get install python2.7-dev

The export LANG=C is to show the messages in english, I forgot that your language is swedish… but no problem, nothing that a translator can’t solve ;).


Gives me the output: https://pastebin.com/1Eyspack

Gives me: https://pastebin.com/04nHHzXF

Oh, how nice. Didn’t know that could be done. :slight_smile:

@feeloor, Ok, lets continue :wink:

The output of:

export LANG=C; dpkg --get-selections | grep deinstall
export LANG=C; dpkg --get-selections | grep hold

Also you could try to install the faulty packages with aptitude, it usually provides some options to try to solve the issue:

aptitude install zlib1g-dev
aptitude install python2.7-dev

If you don’t have aptitude installed:
apt-get install aptitude

@sahsanu, Let me just say it again, thanks a million, you’re a lifesaver! :smile:


This returned empty.

When I tried using aptitude I got suggestions on how to resolve it and I accepted it but doesn’t seemed to have fixed it. Still get the same problem.

@feeloor, do you have the output of aptitude commands?

also, try this:

export LANG=C; apt-get autoremove

and again:

export LANG=C; aptitude install zlib1g-dev python2.7-dev

@sahsanu, Yes, sorry :slight_smile:

zlib1g-dev: https://pastebin.com/gEcqV4g8
python2.7-dev: https://pastebin.com/QhMGWG1P



@feeloor, Ok, the problem is that you installed versions of the packages from other repositories,mono-xamarin, mono-xamarin-beta, nodesources or weechat and these versions are most recent versions than the ones provided by the official repositories.

 libexpat1-dev : Depends: libexpat1 (= 2.1.0-1+deb7u4) but 2.1.0-6 is installed.
 zlib1g-dev : Depends: zlib1g (= 1:1.2.7.dfsg-13) but 1:1.2.8.dfsg-2 is installed.

Show the output of these commands:

export LANG=C; apt-cache policy libexpat1
export LANG=C; apt-cache policy zlib1g

And sorry to ask for so many commands and outputs.

@sahsanu, Aw, that was what I was afraid of.



Absolutely no problem, I’m just happy that you’re willing to spend time to help me :slight_smile:


The output of this command:

for i in $(ls /etc/apt/preferences.d/);do echo "Showing file ${i}:";cat "/etc/apt/preferences.d/${i}";echo;done

If it does nothing, the continue to next step.

Now is time to try to remove the faulty packages, be really careful, if it is going to remove more packages check what are them or if you are in doubt don’t press Y to remove them.

export LANG=C; aptitude remove libexpat1 zlib1g


The first command came back empty.


I’m not really sure, it’s a lot of packages. I’m not that good on Linux, in your opinion is it safe to remove these?

@feeloor, no, don’t remove them.

I can’t see any other easy way to fix the packages issue :frowning: so at this point I would recommend to use other client that doesn’t need these dependencies, I don’t want to break your system.

A lot of people uses acme.sh client with excellent results so I would recommend it to you.

@sahsanu, Alright so it’s possible to get the certificates and install them without using the “auto” function?

Yes of course, certbot-auto is just one of the clients you can use to get your certs. cerbot or in your case certbot-auto is the “official” client and it has a lot of useful options but you can use the client that you want. One of them is acme.sh, is a bash client that doesn’t require too much dependencies, indeed just a few packages that you should already have installed.

In the link I provided earlier there are instructions to install and use it, if you have any problems come back and will try to help you to solve them.

Good luck,

@sahsanu, Okey thank you very much.

I’ll try it and get back to you.

Again, thank you for all the help.


1 Like

@sahsanu, Hey again.

I’ve been trying to get things working with acme.sh but can’t seem to get it to work.

I’ve managed to install it and issue a certificate, I also used the command to install the certificate to my apache2 server but that doesn’t seem to work. So I thought I would manually add it to my config-file. But when apache2 is trying to load the .cer-file its empty.
Am I missing some step here?

I’ve followed the guide on the GitHub but it simply doesn’t work.

Hi @feeloor,

I need to know what were the commands you used to configure and issue the certs. Also, paste here the conf used in your apache virtualhost. Also, if you provide your domain name I could check whether you really issued the certificate for your domain.