dpkg --install 的使用

測試環境

以下測試是在「Xubuntu 14.04 64位元」。

使用範例

「dpkg --install」的使用範例,請參考「如何安裝套件」這篇。

手冊說明

$ man dpkg

可以看到一段說明

ACTIONS
       -i, --install package-file...
              Install the package. If --recursive or -R option is specified, package-file must refer to a directory instead.

              Installation consists of the following steps:

              1. Extract the control files of the new package.

              2. If another version of the same package was installed before the new installation, execute prerm  script  of  the  old
              package.

              3. Run preinst script, if provided by the package.

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

              5. If another version of the same package was installed before the new installation, execute the postrm  script  of  the
              old  package. Note that this script is executed after the preinst script of the new package, because new files are writ‐
              ten at the same time old files are removed.

              6. Configure the package. See --configure for detailed information about how this is done.

  ...略...