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

Understanding package dependencies



I've always thought, that a package's dependencies must be full-filled
to install that package and that apt-get automatically manages these
dependencies.  And also, that if I remove a package, that all other
packages are removed, that depend on it.  Like this:

    # aptitude purge bind9-libs
    The following packages will be REMOVED:
      bind9-libs{p} libjemalloc2{u}
    0 packages upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
    Need to get 0 B of archives. After unpacking 4668 kB will be freed.
    The following packages have unmet dependencies:
     bind9-host : Depends: bind9-libs (= 1:9.18.19-1~deb12u1) but it is not going to be installed
     bind9 : Depends: bind9-libs (= 1:9.18.19-1~deb12u1) but it is not going to be installed
     bind9-dnsutils : Depends: bind9-libs (= 1:9.18.19-1~deb12u1) but it is not going to be installed
     bind9-utils : Depends: bind9-libs (= 1:9.18.19-1~deb12u1) but it is not going to be installed
    The following actions will resolve these dependencies:

         Remove the following packages:
    1)     bind9 [1:9.18.19-1~deb12u1 (now, stable-security)]
    2)     bind9-dnsutils [1:9.18.19-1~deb12u1 (now, stable-security)]
    3)     bind9-host [1:9.18.19-1~deb12u1 (now, stable-security)]
    4)     bind9-utils [1:9.18.19-1~deb12u1 (now, stable-security)]


But how can this then be explained?

    # aptitude why lsb-base
    i   ntpsec Depends lsb-base
    # aptitude show ntpsec | grep ^Depends
    Depends: adduser, lsb-base, netbase, python3, python3-ntp (= 1.2.2+dfsg1-1+deb12u1), tzdata, libbsd0 (>= 0.0), libc6 (>= 2.34), libcap2 (>= 1:2.10), libssl3 (>= 3.0.0)
    # aptitude purge lsb-base
    The following packages will be REMOVED:
      lsb-base{p}
    0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
    Need to get 0 B of archives. After unpacking 12.3 kB will be freed.
    Do you want to continue? [Y/n/?]

Won't continuing here leave ntpsec with an unresolved package dependency?

Steve


Reply to: