“apt-get install”什么时候要求我确认是否要继续?

Mar*_*tin 11 apt

有时“apt-get install”会问我"Do you want to continue [Y/n]?"

root@T43:~# apt-get install chmsee
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libchm1
The following NEW packages will be installed:
  chmsee libchm1
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 192 kB of archives.
After this operation, 848 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
Run Code Online (Sandbox Code Playgroud)

我是否正确,仅当"The following NEW packages will be installed:"line 列出了其他包(可能是依赖项)而不是我指定为参数的包时才会发生这种情况"apt-get install"

Ren*_*nan 12

这个超级用户的回答中你想继续吗?在以下情况下会出现提示:

  • 将安装额外的软件包(除了您要求安装的软件包 - 例如依赖项)
  • 基本包将被删除。此处的基本定义为 必须始终在系统上可用和可用的最小功能集,即使包处于未配置(但未打包)状态。包被标记为使用基本控制字段的系统必不可少的。
  • 更改保留的包裹

如果你想apt-get自动说是(不是一个很好的主意,除非你有非常具体的原因),你可以使用--yes --force-yes参数。

  • 但是,我不建议使用 `--force-yes`,除非您 **a)** 一开始就不需要问这个问题,或者 **b)** 想要一个损坏的系统。 (3认同)