sudo apt-get -f install 到底做了什么?

The*_*Fog 49 apt sudo

我以前见过。我只是想知道它到底是做什么的?

Isa*_*iah 45

来自man apt-get

   -f, --fix-broken
       Fix; attempt to correct a system with broken dependencies in place. This
       option, when used with install/remove, can omit any packages to permit APT
       to deduce a likely solution. If packages are specified, these have to
       completely correct the problem. The option is sometimes necessary when
       running APT for the first time; APT itself does not allow broken package
       dependencies to exist on a system. It is possible that a system's dependency
       structure can be so corrupt as to require manual intervention (which usually
       means using dselect(1) or dpkg --remove to eliminate some of the offending
       packages). Use of this option together with -m may produce an error in some
       situations. Configuration Item: APT::Get::Fix-Broken.
Run Code Online (Sandbox Code Playgroud)

  • A 你可以为此感谢主。当您的包裹破损时,就像鞋子里有一块石头……而您正在参加一场马拉松……熊骑着鲨鱼骑着巨大的蜘蛛。但是多亏了这个破损的东西得到了修复。 (20认同)
  • 在偶尔的情况下,`sudo apt-get -f install` 本身不足以修复损坏的软件包,请参阅 [这个答案](http://askubuntu.com/a/183625/22949)。 (2认同)