A custom Debian package has this dependency in the Debian control file:
Depends: docker-ce (=17.03.2~ce-0~debian-stretch)
That must be downloaded from download.docker.com
as it isn't part of the official Debian repositories. The apt sources list looks like this:
# cat /etc/apt/sources.list /etc/apt/sources.list.d/*
deb http://deb.debian.org/debian stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb http://deb.debian.org/debian stretch-updates main
deb https://download.docker.com/linux/debian stretch stable
Installing that custom Debian package fails:
# dpkg --install --force-depends foo.deb
Selecting previously unselected package foo.
(Reading database ... 15743 files and directories currently installed.)
Preparing to unpack foo.deb ...
Unpacking foo (0.0.0-1) ...
dpkg: foo: dependency problems, but configuring anyway as you requested:
foo depends on docker-ce (= 17.03.2~ce-0~debian-stretch); however:
Package docker-ce is not installed.
Setting up foo (0.0.0-1) ...
# apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
foo
0 upgraded, 0 newly installed, 1 to remove and 18 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
I thought apt --fix-broken
would install the missing docker-ce
package from the third-party repository, but instead it wants to remove my foo
package. The following works:
# apt-get install docker-ce=17.03.2~ce-0~debian-stretch
# dpkg --install foo.deb
What I have tried so far:
# apt-get -o Debug::pkgProblemResolver=true install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies...Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) foo:amd64 < 0.0.0-1 @iU mK Nb Ib >
Broken foo:amd64 Depends on docker-ce:amd64 < none | 5:18.09.2~3-0~debian-stretch @un uH > (= 17.03.2~ce-0~debian-stretch)
Considering docker-ce:amd64 0 as a solution to foo:amd64 2
Removing foo:amd64 rather than change docker-ce:amd64
# apt install --assume-yes $PWD/foo.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'foo' instead of '/src/foo.deb'
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:
foo : Depends: docker-ce (= 17.03.2~ce-0~debian-stretch) but 5:18.09.2~3-0~debian-stretch is to be installed
E: Unable to correct problems, you have held broken packages.
# apt-cache policy docker-ce
docker-ce:
Installed: (none)
Candidate: 5:18.09.2~3-0~debian-stretch
Version table:
5:18.09.2~3-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
5:18.09.1~3-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
5:18.09.0~3-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
18.06.3~ce~3-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
18.06.2~ce~3-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
18.06.1~ce~3-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
18.06.0~ce~3-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
18.03.1~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
18.03.0~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.12.1~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.12.0~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.09.1~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.09.0~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.06.2~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.06.1~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.06.0~ce-0~debian 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.03.3~ce-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.03.2~ce-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.03.1~ce-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages
17.03.0~ce-0~debian-stretch 500
500 https://download.docker.com/linux/debian stretch/stable amd64 Packages