如果我将 -f 标志放在命令之前或之后,apt 会介意吗?

如果我将 -f 标志放在命令之前或之后,apt 会介意吗?

当我遇到依赖冲突时,install -f应该纠正问题。

apt-get install -f 和有什么区别apt-get -f install

答案1

apt-get install -f和的意思相同apt-get -f install

man apt-get

   -f, --fix-broken
       Fix; attempt to correct a system with broken dependencies in place. This
       option, when used with install/remove, can omit any packages to permit APT
       to deduce a likely solution. If packages are specified, these have to
       completely correct the problem. The option is sometimes necessary when
       running APT for the first time; APT itself does not allow broken package
       dependencies to exist on a system. It is possible that a system's dependency
       structure can be so corrupt as to require manual intervention (which usually
       means using dselect(1) or dpkg --remove to eliminate some of the offending
       packages). Use of this option together with -m may produce an error in some
       situations. Configuration Item: APT::Get::Fix-Broken.

答案2

我认为向 apt-get 提供这些选项的顺序并不重要。它们的含义相同。

sudo apt-get -y install相当于sudo apt-get install -y

相关内容