什么是dpkg-reconfigure?与dpkg --configure有何不同?


Answers:


16

man dpkg

   --configure package...|-a|--pending
          Configure a package which has been unpacked but not yet  config‐
          ured.   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.

man dpkg-reconfigure

   dpkg-reconfigure - reconfigure an already installed package

   -pvalue, --priority=value
       Specify the minimum priority of question that will be displayed.
       dpkg-reconfigure normally shows low priority questions no matter
       what your default priority is. See debconf(7) for a list.

   -a, --all
       Reconfigure all installed packages that use debconf. Warning: this
       may take a long time.

在这里dpkg --configure -a将配置所有未打包但未配置的软件包。而dpkg-reconfigure -phigh -a将重新配置所有debconf优先使用的已安装软件包。


3
请注意,从15.10版本开始,“-a”“-all”选项不可用,因为我发现尝试在16.04上使用它。 askubuntu.com/questions/775328/…–
linux64kb

1
不过,我还是有点困惑。那么,当dpkg-reconfigure“重新配置”它时,它对该软件包究竟做了什么?我在该站点上看到第一个回答dpkg-reconfigure的答案:superuser.com/questions/1153203/…。重新配置resolvconf后会发生什么?
Samuel L.
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.