我阅读了关于如何从特定来源安装apt的答案。https://askubuntu.com/questions/27362/how-to-only-install-updates-from-a-specific-repository/57749#57749
但我对这个例子感到困惑。
资料来源:deb http://mozilla.debian.net/ squeeze-backports iceweasel-release
命令是:apt-get install -t squeeze-backports iceweasel
所以,在deb http://xxx.xxx.xx/之后,唯一定义源的是什么。
然后我查了我的来源名单。我发现了重复的路径,我想知道apt是如何区分彼此的?
Hit:1 http://mirrors.aliyun.com/ubuntu bionic InRelease
Hit:2 http://mirrors.aliyun.com/ubuntu bionic-security InRelease
Hit:3 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease
Hit:4 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease
Hit:5 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease
Ign:6 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:7 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:8 http://dl.google.com/linux/chrome/deb stable Release
Ign:10 https://dl.bintray.com/rabbitmq-erlang/debian {distribution} InRelease
Err:11 https://dl.bintray.com/rabbitmq-erlang/debian {distribution} Release
404 Not Found [IP: 52.41.180.114 443]
Hit:12 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:13 http://linux.teamviewer.com/deb stable InRelease
Hit:14 https://www.charlesproxy.com/packages/apt charles-proxy InRelease
Hit:15 http://ppa.launchpad.net/fontforge/fontforge/ubuntu bionic InRelease
Hit:16 https://download.sublimetext.com apt/stable/ InRelease
Hit:18 http://ppa.launchpad.net/nathan-renniewaldock/flux/ubuntu bionic InRelease
Hit:17 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu bionic InRelease特别代表:
Hit:17 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu bionic InRelease
Hit:1 http://mirrors.aliyun.com/ubuntu bionic InRelease
Hit:12 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:1 http://mirrors.aliyun.com/ubuntu bionic InRelease所有4个源链接都有ubuntu bionic InRelease。
如果简单地提供了,apt如何知道我想从哪个特定的源代码中安装
apt install something_all_these_4_source_has -t ubuntu bionic InRelease,没有完整的url?
(假设所有4个源代码都有我想安装的应用程序,但版本不同)
发布于 2020-03-25 13:44:41
所以,在
deb http://xxx.xxx.xx/之后,唯一定义源的是什么。
不,源是由其Release文件和其中的条目,特别是Codename条目定义的;例如,请参见伸展式靠背Release文件。
当您指定-t选项时,它会覆盖apt‘S的“默认发行版”,后者是最高优先级的发行版。可能的值是基于配置的存储库的可访问版本。“ubuntu仿生InRelease”不是一个有效的目标。
如果具有相同名称的多个存储库具有给定包的不同版本,则apt的基于优先级的解析确定使用的版本;请参见APT钉扎相关性解析 (这允许您区分包的来源,即包含它们的存储库)。默认情况下,最高版本获胜。您可以通过使用=:apt install package=version指定特定版本(而不是存储库或目标版本)来覆盖该版本。
所有这一切背后都有一个基本的假设:一个包的给定版本的所有可用副本都是相同的,所有的存储库都在为它做广告。
https://unix.stackexchange.com/questions/574878
复制相似问题