当用户请求安装软件包时,Ubuntu 软件包管理器如何确定要搜索哪个存储库?

当用户请求安装软件包时,Ubuntu 软件包管理器如何确定要搜索哪个存储库?

包管理器如何易于在 Ubuntu 上,当用户请求安装包时,确定应该从中检索包的特定存储库?

答案1

经过一番研究,我了解到包管理器如何确定选择哪个存储库来安装包。让我们以包为例htop。当我们使用命令检查包详细信息时apt show,它会提供如下结构的信息:

Package: htop
Version: 3.0.5-7build2
Priority: optional
Section: utils
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Daniel Lange <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 342 kB
Depends: libc6 (>= 2.34), libncursesw6 (>= 6), libnl-3-200 (>= 3.2.7), libnl-genl-3-200 (>= 3.2.7), libtinfo6 (>= 6)
Suggests: lm-sensors, lsof, strace
Homepage: https://htop.dev/
Task: cloud-image, ubuntu-wsl, server, ubuntu-server-raspi, lubuntu-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop, ubuntu-budgie-desktop-raspi
Download-Size: 128 kB
APT-Manual-Installed: yes
APT-Sources: http://pk.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
Description: interactive processes viewer
 Htop is an ncursed-based process viewer similar to top, but it
 allows one to scroll the list vertically and horizontally to see
 all processes and their full command lines.
 .
 Tasks related to processes (killing, renicing) can be done without
 entering their PIDs.

通过检查APT-Sources密钥,我们可以确定包管理器将选择文件http://pk.archive.ubuntu.com/ubuntu jammy/main中指定的存储库/etc/apt/sources.list来安装包。

相关内容