Debian – apt-get don’t support https and can’t install the necessery package to do it

aptdebianhttps

On Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64
I'm using Ansible (software to manage and configure machines) to install Passenger and copy the sources.list from another machine. To install passenger, I need to install apt-transport-https, but I keep having the same errror:

The following packages have unmet dependencies: apt-transport-https: Depends: libapt-pkg4.10

I tried to fix and update that package but in vain and I'm currently out of ideas…

Is there another way to make apt-get accept https sources?
apt-transport-https depends on libapt-pkg4.10 but can't work with its upgraded version?

root@machine:~# apt-cache policy libapt-pkg4.12

libapt-pkg4.12:
Installé : 0.9.7.9+deb7u4
Candidat : 0.9.7.9+deb7u4
Table de version :
*** 0.9.7.9+deb7u4 0
100 /var/lib/dpkg/status

Best Answer

You're trying to install apt-transport-https from oldstable, that depends on the old libapt-pkg4.10 instead of libapt-pkg4.12. Get the correct version. If all else fails you can find the version from stable (wheezy) here