`--no-install-recommends` 仅指定包

`--no-install-recommends` 仅指定包

我想安装 xfce4-goodies,但我不想要 Midori 浏览器。--no-install-recommends我不知道如何仅指定 Midori。我想要其余的软件包。怎么做?谢谢!

答案1

在这种情况下,正如托马斯所回答的,midori不是推荐的软件包之一xfce4-goodies,因此不需要做任何特殊的事情。

但是,一般情况下,你可以使用以下方法阻止特定的推荐或建议软件包:名字后面有一个连字符

apt install xfce4-goodies xfce4-power-manager-

强制-apt 考虑删除该软件包,因此不会安装它。当然,这不适用于硬依赖关系,只适用于推荐/建议的软件包,以及提供硬依赖关系的众多候选软件包之一。

相应地,当删除包及其依赖项时,你可以在依赖项后面加上加号来保留它:

apt-get autoremove xfce4-goodies xfce4-artwork+

apt和的任何安装和删除子命令apt-get均可用于安装和删除。

答案2

我认为这是由于上游 XCFE.org 页面(该页面指出 Midori 是 xfce4 的好东西之一)与实际安装的内容之间的混淆。

它所安装的软件包的实际依赖项xfce4-goodies甚至没有在任何地方引用 Midori。从apt-get install --dry-run xfce4-goodies标准的 Ubuntu 16.04 机器上看:

NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libqmi-glib1 linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic
  linux-image-4.4.0-109-generic linux-image-extra-4.4.0-109-generic
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  exo-utils hddtemp libexo-1-0 libexo-common libexo-helpers libgarcon-1-0
  libgarcon-common libtagc0 libthunarx-2-0 libtumbler-1-0 libunique-1.0-0
  libvte-common libvte9 libwnck-common libwnck22 libxfce4ui-1-0
  libxfce4ui-common libxfce4util-bin libxfce4util-common libxfce4util7
  libxfconf-0-2 lm-sensors mousepad ristretto thunar thunar-archive-plugin
  thunar-data thunar-media-tags-plugin thunar-volman tumbler tumbler-common
  xfburn xfce4-artwork xfce4-battery-plugin xfce4-clipman xfce4-clipman-plugin
  xfce4-cpufreq-plugin xfce4-cpugraph-plugin xfce4-datetime-plugin xfce4-dict
  xfce4-diskperf-plugin xfce4-fsguard-plugin xfce4-genmon-plugin
  xfce4-mailwatch-plugin xfce4-mount-plugin xfce4-netload-plugin xfce4-notes
  xfce4-notes-plugin xfce4-panel xfce4-places-plugin xfce4-power-manager
  xfce4-power-manager-data xfce4-power-manager-plugins xfce4-screenshooter
  xfce4-sensors-plugin xfce4-smartbookmark-plugin xfce4-systemload-plugin
  xfce4-taskmanager xfce4-terminal xfce4-timer-plugin xfce4-verve-plugin
  xfce4-wavelan-plugin xfce4-weather-plugin xfce4-whiskermenu-plugin
  xfce4-xkb-plugin xfconf
Suggested packages:
  ksensors devhelp fancontrol sensord read-edid i2c-tools
  tumbler-plugins-extra xfce4-cellmodem-plugin xfce4-linelight-plugin
  xfce4-messenger-plugin xfce4-mpc-plugin xfce4-radio-plugin xfswitch-plugin
  xfce4-hdaps gigolo parole xsensors
The following NEW packages will be installed:
  exo-utils hddtemp libexo-1-0 libexo-common libexo-helpers libgarcon-1-0
  libgarcon-common libtagc0 libthunarx-2-0 libtumbler-1-0 libunique-1.0-0
  libvte-common libvte9 libwnck-common libwnck22 libxfce4ui-1-0
  libxfce4ui-common libxfce4util-bin libxfce4util-common libxfce4util7
  libxfconf-0-2 lm-sensors mousepad ristretto thunar thunar-archive-plugin
  thunar-data thunar-media-tags-plugin thunar-volman tumbler tumbler-common
  xfburn xfce4-artwork xfce4-battery-plugin xfce4-clipman xfce4-clipman-plugin
  xfce4-cpufreq-plugin xfce4-cpugraph-plugin xfce4-datetime-plugin xfce4-dict
  xfce4-diskperf-plugin xfce4-fsguard-plugin xfce4-genmon-plugin xfce4-goodies
  xfce4-mailwatch-plugin xfce4-mount-plugin xfce4-netload-plugin xfce4-notes
  xfce4-notes-plugin xfce4-panel xfce4-places-plugin xfce4-power-manager
  xfce4-power-manager-data xfce4-power-manager-plugins xfce4-screenshooter
  xfce4-sensors-plugin xfce4-smartbookmark-plugin xfce4-systemload-plugin
  xfce4-taskmanager xfce4-terminal xfce4-timer-plugin xfce4-verve-plugin
  xfce4-wavelan-plugin xfce4-weather-plugin xfce4-whiskermenu-plugin
  xfce4-xkb-plugin xfconf
0 upgraded, 67 newly installed, 0 to remove and 215 not upgraded.
Inst libxfce4util-common (4.12.1-2 Ubuntu:16.04/xenial [all])
Inst libxfce4util7 (4.12.1-2 Ubuntu:16.04/xenial [amd64])
Inst xfconf (4.12.0-2 Ubuntu:16.04/xenial [amd64])
Inst libxfconf-0-2 (4.12.0-2 Ubuntu:16.04/xenial [amd64])
Inst libxfce4ui-common (4.12.1-2 Ubuntu:16.04/xenial [all])
Inst libxfce4ui-1-0 (4.12.1-2 Ubuntu:16.04/xenial [amd64])
Inst libgarcon-common (0.4.0-2 Ubuntu:16.04/xenial [all])
Inst libgarcon-1-0 (0.4.0-2 Ubuntu:16.04/xenial [amd64])
Inst libexo-common (0.10.7-1 Ubuntu:16.04/xenial [all])
Inst libexo-helpers (0.10.7-1 Ubuntu:16.04/xenial [amd64])
Inst libexo-1-0 (0.10.7-1 Ubuntu:16.04/xenial [amd64])
Inst exo-utils (0.10.7-1 Ubuntu:16.04/xenial [amd64])
Inst libtagc0 (1.9.1-2.4ubuntu1 Ubuntu:16.04/xenial [amd64])
Inst thunar-data (1.6.11-0ubuntu0.16.04.2 Ubuntu:16.04/xenial-updates [all])
Inst libthunarx-2-0 (1.6.11-0ubuntu0.16.04.2 Ubuntu:16.04/xenial-updates [amd64])
Inst libtumbler-1-0 (0.1.31-2build2 Ubuntu:16.04/xenial [amd64])
Inst libunique-1.0-0 (1.1.6-5 Ubuntu:16.04/xenial [amd64])
Inst libvte-common (1:0.28.2-5ubuntu3 Ubuntu:16.04/xenial [all])
Inst libvte9 (1:0.28.2-5ubuntu3 Ubuntu:16.04/xenial [amd64])
Inst libwnck-common (1:2.30.7-5ubuntu1.1 Ubuntu:16.04/xenial-updates [all])
Inst libwnck22 (1:2.30.7-5ubuntu1.1 Ubuntu:16.04/xenial-updates [amd64])
Inst libxfce4util-bin (4.12.1-2 Ubuntu:16.04/xenial [amd64])
Inst mousepad (0.4.0-3ubuntu1 Ubuntu:16.04/xenial [amd64])
Inst thunar (1.6.11-0ubuntu0.16.04.2 Ubuntu:16.04/xenial-updates [amd64])
Inst thunar-archive-plugin (0.3.1-4 Ubuntu:16.04/xenial [amd64])
Inst thunar-media-tags-plugin (0.2.1-1 Ubuntu:16.04/xenial [amd64])
Inst thunar-volman (0.8.1-2 Ubuntu:16.04/xenial [amd64])
Inst tumbler-common (0.1.31-2build2 Ubuntu:16.04/xenial [all])
Inst tumbler (0.1.31-2build2 Ubuntu:16.04/xenial [amd64])
Inst xfburn (0.5.4-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-artwork (0.1.1a~git+20110420-1 Ubuntu:16.04/xenial [all])
Inst xfce4-panel (4.12.0-3ubuntu2 Ubuntu:16.04/xenial [amd64])
Inst xfce4-battery-plugin (1.0.5-4build1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-clipman (2:1.2.6-1build1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-clipman-plugin (2:1.2.6-1build1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-cpufreq-plugin (1.1.2-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-cpugraph-plugin (1.0.5-1build1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-datetime-plugin (0.6.2-2ubuntu2 Ubuntu:16.04/xenial [amd64])
Inst xfce4-dict (0.7.1-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-diskperf-plugin (2.5.5-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-fsguard-plugin (1.0.2-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-genmon-plugin (3.4.0-2build1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-mailwatch-plugin (1.2.0-2ubuntu2 Ubuntu:16.04/xenial [amd64])
Inst xfce4-mount-plugin (0.6.7-1build1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-netload-plugin (1.2.4-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-notes (1.8.1-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-notes-plugin (1.8.1-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-places-plugin (1.7.0-3 Ubuntu:16.04/xenial [amd64])
Inst xfce4-sensors-plugin (1.2.6-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-smartbookmark-plugin (0.4.6-2 Ubuntu:16.04/xenial [amd64])
Inst xfce4-systemload-plugin (1:1.1.2-0ubuntu2 Ubuntu:16.04/xenial [amd64])
Inst xfce4-timer-plugin (1.6.0-1build1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-verve-plugin (1.1.0-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-wavelan-plugin (0.5.12-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-weather-plugin (0.8.9-0ubuntu0.16.04.1 Ubuntu:16.04/xenial-updates [amd64])
Inst xfce4-whiskermenu-plugin (1.5.1-1ubuntu1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-xkb-plugin (1:0.7.1-2 Ubuntu:16.04/xenial [amd64])
Inst ristretto (0.8.0-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-screenshooter (1.8.2-2 Ubuntu:16.04/xenial [amd64])
Inst xfce4-taskmanager (1.1.0-1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-terminal (0.6.3-2ubuntu1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-goodies (4.12.1 Ubuntu:16.04/xenial [amd64])
Inst xfce4-power-manager-data (1.4.4-4ubuntu2 Ubuntu:16.04/xenial [all])
Inst xfce4-power-manager (1.4.4-4ubuntu2 Ubuntu:16.04/xenial [amd64])
Inst xfce4-power-manager-plugins (1.4.4-4ubuntu2 Ubuntu:16.04/xenial [amd64])
Inst hddtemp (0.3-beta15-52 Ubuntu:16.04/xenial [amd64])
Inst lm-sensors (1:3.4.0-2 Ubuntu:16.04/xenial [amd64])
Conf libxfce4util-common (4.12.1-2 Ubuntu:16.04/xenial [all])
Conf libxfce4util7 (4.12.1-2 Ubuntu:16.04/xenial [amd64])
Conf xfconf (4.12.0-2 Ubuntu:16.04/xenial [amd64])
Conf libxfconf-0-2 (4.12.0-2 Ubuntu:16.04/xenial [amd64])
Conf libxfce4ui-common (4.12.1-2 Ubuntu:16.04/xenial [all])
Conf libxfce4ui-1-0 (4.12.1-2 Ubuntu:16.04/xenial [amd64])
Conf libgarcon-common (0.4.0-2 Ubuntu:16.04/xenial [all])
Conf libgarcon-1-0 (0.4.0-2 Ubuntu:16.04/xenial [amd64])
Conf libexo-common (0.10.7-1 Ubuntu:16.04/xenial [all])
Conf libexo-helpers (0.10.7-1 Ubuntu:16.04/xenial [amd64])
Conf libexo-1-0 (0.10.7-1 Ubuntu:16.04/xenial [amd64])
Conf exo-utils (0.10.7-1 Ubuntu:16.04/xenial [amd64])
Conf libtagc0 (1.9.1-2.4ubuntu1 Ubuntu:16.04/xenial [amd64])
Conf thunar-data (1.6.11-0ubuntu0.16.04.2 Ubuntu:16.04/xenial-updates [all])
Conf libthunarx-2-0 (1.6.11-0ubuntu0.16.04.2 Ubuntu:16.04/xenial-updates [amd64])
Conf libtumbler-1-0 (0.1.31-2build2 Ubuntu:16.04/xenial [amd64])
Conf libunique-1.0-0 (1.1.6-5 Ubuntu:16.04/xenial [amd64])
Conf libvte-common (1:0.28.2-5ubuntu3 Ubuntu:16.04/xenial [all])
Conf libvte9 (1:0.28.2-5ubuntu3 Ubuntu:16.04/xenial [amd64])
Conf libwnck-common (1:2.30.7-5ubuntu1.1 Ubuntu:16.04/xenial-updates [all])
Conf libwnck22 (1:2.30.7-5ubuntu1.1 Ubuntu:16.04/xenial-updates [amd64])
Conf libxfce4util-bin (4.12.1-2 Ubuntu:16.04/xenial [amd64])
Conf mousepad (0.4.0-3ubuntu1 Ubuntu:16.04/xenial [amd64])
Conf thunar (1.6.11-0ubuntu0.16.04.2 Ubuntu:16.04/xenial-updates [amd64])
Conf thunar-archive-plugin (0.3.1-4 Ubuntu:16.04/xenial [amd64])
Conf thunar-media-tags-plugin (0.2.1-1 Ubuntu:16.04/xenial [amd64])
Conf thunar-volman (0.8.1-2 Ubuntu:16.04/xenial [amd64])
Conf tumbler-common (0.1.31-2build2 Ubuntu:16.04/xenial [all])
Conf tumbler (0.1.31-2build2 Ubuntu:16.04/xenial [amd64])
Conf xfburn (0.5.4-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-artwork (0.1.1a~git+20110420-1 Ubuntu:16.04/xenial [all])
Conf xfce4-panel (4.12.0-3ubuntu2 Ubuntu:16.04/xenial [amd64])
Conf xfce4-battery-plugin (1.0.5-4build1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-clipman (2:1.2.6-1build1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-clipman-plugin (2:1.2.6-1build1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-cpufreq-plugin (1.1.2-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-cpugraph-plugin (1.0.5-1build1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-datetime-plugin (0.6.2-2ubuntu2 Ubuntu:16.04/xenial [amd64])
Conf xfce4-dict (0.7.1-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-diskperf-plugin (2.5.5-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-fsguard-plugin (1.0.2-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-genmon-plugin (3.4.0-2build1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-mailwatch-plugin (1.2.0-2ubuntu2 Ubuntu:16.04/xenial [amd64])
Conf xfce4-mount-plugin (0.6.7-1build1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-netload-plugin (1.2.4-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-notes (1.8.1-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-notes-plugin (1.8.1-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-places-plugin (1.7.0-3 Ubuntu:16.04/xenial [amd64])
Conf xfce4-sensors-plugin (1.2.6-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-smartbookmark-plugin (0.4.6-2 Ubuntu:16.04/xenial [amd64])
Conf xfce4-systemload-plugin (1:1.1.2-0ubuntu2 Ubuntu:16.04/xenial [amd64])
Conf xfce4-timer-plugin (1.6.0-1build1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-verve-plugin (1.1.0-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-wavelan-plugin (0.5.12-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-weather-plugin (0.8.9-0ubuntu0.16.04.1 Ubuntu:16.04/xenial-updates [amd64])
Conf xfce4-whiskermenu-plugin (1.5.1-1ubuntu1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-xkb-plugin (1:0.7.1-2 Ubuntu:16.04/xenial [amd64])
Conf ristretto (0.8.0-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-screenshooter (1.8.2-2 Ubuntu:16.04/xenial [amd64])
Conf xfce4-taskmanager (1.1.0-1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-terminal (0.6.3-2ubuntu1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-goodies (4.12.1 Ubuntu:16.04/xenial [amd64])
Conf xfce4-power-manager-data (1.4.4-4ubuntu2 Ubuntu:16.04/xenial [all])
Conf xfce4-power-manager (1.4.4-4ubuntu2 Ubuntu:16.04/xenial [amd64])
Conf xfce4-power-manager-plugins (1.4.4-4ubuntu2 Ubuntu:16.04/xenial [amd64])
Conf hddtemp (0.3-beta15-52 Ubuntu:16.04/xenial [amd64])
Conf lm-sensors (1:3.4.0-2 Ubuntu:16.04/xenial [amd64])

其中没有任何地方提到 Midori。

现在,如果您尝试安装完整的 XFCE 软件包集而不仅仅是 goodies 软件包,那么 Midori 可能会包含在内。(但是它不是任何地方的标准软件包集的一部分,甚至默认也不在 Xubuntu 软件包集中,除非它作为其自己的依赖项被引入)

相关内容