“apt install --fix-broken” 中的“--fix-broken”的含义在哪里记录

“apt install --fix-broken” 中的“--fix-broken”的含义在哪里记录

在 WSLg 上安装 Chrome 的指南建议执行sudo apt install --fix-broken。我没有找到--fix-broken中记录的选项man apt。此选项是否记录在某处和/或它的作用是什么?

答案1

apt是前端/处理程序/替代方案,apt-get如所述man apt

apt provides a high-level commandline interface for the package management system. It is
intended as an end user interface and enables some options better suited for interactive
usage by default compared to more specialized APT tools like apt-get(8) and apt-cache(8).

其中也有这样的说明:

Much like apt itself, its manpage is intended as an end user interface and as such only
mentions the most used commands and options partly to not duplicate information in
multiple places and partly to avoid overwhelming readers with a cornucopia of options and
details.

所以,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 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.

相关内容