apt-offline 仅安装特定软件包,不升级/更新

apt-offline 仅安装特定软件包,不升级/更新

apt-offline似乎是在非联网机器上安装软件包的绝佳工具。

但是,我遇到了一个问题,它update/upgrade不只是安装我指定的软件包。有没有办法强制它只安装选定的软件包(及其依赖项)?

答案1

根据手册页使用 apt-offline 时必须遵循以下顺序:

Sequence  1:  The following set of commands, when run in sequence, will
   update a disconnected machine.

          apt-offline set update.sig --update

          (Generate the required data needed to update the  APT  database.
          Should be run on the disconnected machine)

          apt-offline get update.sig --bundle update.zip

          (Download  the  required data needed to update the APT database.
          Should be run on a machine with internet connectivity)

          apt-offline install update.zip

          (Installs the data needed to update the APT database. Should  be
          run on the disconnected machine)


Sequence  2: With successful completion of Sequence 1, the APT database
   on the disconnected machine will be up-to-date. Now, the following  set
   of commands, when run in sequence, will upgrade a disconnected machine.

          apt-offline set upgrade.sig --upgrade

          (Genereate  the  required  data needed to upgrade the upgradable
          packages. Should be run on the disconnected machine)

          apt-offline get upgrade.sig --bundle upgrade.zip

          (Download the required data needed  to  upgrade  the  upgradable
          packages. Should be run on a machine with internet connectivity)

          apt-offline install upgrade.zip

          (Installs  the  data  needed to upgrade the upgradable packages.
          Should be run on the disconnected machine)

After completion of
          Sequence 1 and Sequence 2  in  order,  further  running  apt-get
          upgrade will result in 0 bytes of additional download.

相关内容