[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debugging apt-get



Hi,

Quoting Stefan Seefeld (2022-10-15 00:10:14)
> 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 likely because 1.0.3 is not the candidate version of Y. What is the output
of this command:

apt-cache policy Y

> Is there a way to debug this, i.e. have `apt-get` produce more verbose output
> that indicates *why* the prerequisite package is not going to be installed ?

Sure! Run apt with these options:

 -oDebug::pkgProblemResolver=true
 -oDebug::pkgDepCache::Marker=1
 -oDebug::pkgDepCache::AutoInstall=1

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature


Reply to: