When I installing .deb packages by hand I often encounter circular dependencies.

I, then, install it with dpkg -i --force-depends ... and hope it works.

How does apt handle circular dependencies?


Circular dependencies happen in the repositories, but the ones left standing obey some specific rules.

Usually these are tightly bound packages (such as between g++-4.6 and libstdc++6-4.6-dev, or perl and perl-modules), so the Depends relationship between them specify the exact version number. For example, g++-4.6 4.6.3-1ubuntu5 depends on libstdc++6-4.6-dev (= 4.6.3-1ubuntu5), and libstdc++6-4.6-dev 4.6.3-1ubuntu5 on g++-4.6 (= 4.6.3-1ubuntu5). Such packages are always installed, upgraded or removed together. As to the algorithm that apt-get uses, I don't know, but you can read up on the aptitude algorithm on the aptitude creator's page.

  • That's an interesting link. Thanks for sharing. It does not account for all I have found so far, though. Weird. – Minix Feb 12 '15 at 21:16
  • @muru you mean apt really does not mean the last package as of linear depends on the package which depends on it? But instead apt try to express that the last dep is a sole dependency only by the other mentioned – nikmat Mar 3 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.