dpkg --configure -a 有什么作用?

teh*_*lip 8 package-management apt dpkg

标题解释了它,但是为什么当我通过我的盒子上的终端安装软件包时必须使用它然后安装失败,这是为什么,“dpkg --configure -a”做了什么来修复它,普通的“ sudo apt”不能做吗?

Mit*_*tch 6

联机帮助页

--configure package...|-a|--pending
          Reconfigure an unpacked package. If -a  or  --pending  is  given
          instead  of  package, all unpacked but unconfigured packages are
          configured.

          Configuring consists of the following steps:

          1. Unpack the conffiles, and at the same time back  up  the  old
          conffiles, so that they can be restored if something goes wrong.

          2. Run postinst script, if provided by the package.
Run Code Online (Sandbox Code Playgroud)


mur*_*uru 5

aptaptitudesynaptic等都是前端相同的工具:dpkgdpkg非常低级,apt也不是特别聪明。所以如果包配置被中断,apt告诉你下降到较低的级别来修复它。请注意,apt可能不知道导致问题的包(它们可能是手动安装的本地包,它们可能是一百个包而不是一个)并保持简单,它告诉您使用知道它们的工具. Mitch 已经发布了这个命令的作用。