On Tue, Oct 11, 2022 at 10:35:46PM -0400, Stefan Seefeld wrote: > I'm trying to build a docker image containing a debian package I just > created locally. > > I'm thus running the command `apt-get update && apt-get install -y ./X.deb` > from my dockerfile. This command fails with the message > > ... > > The following packages have unmet dependencies: > X : Depends: Y (= 1.0.3) but it is not going to be installed > > ... > > However, if I run `apt-get update && apt-get install Y=1.0.3` first, the > build completes successfully. What could cause this behaviour ? Why would > `apt-get` not be able to install a prerequisite package, when installing it > explicitly works ?
Most probably because there is another version of Y with a higher priority. Try doing "apt-cache policy Y", that might shed light on this. > (I'm running on Ubuntu 20.04, using apt-get=2.0.6) (Isn't there a Ubuntu mailing list, btw? They might be doing funny stuff with their packaging which perhaps change the problem space) Cheers -- t > > Thanks,
signature.asc
Description: PGP signature