sudo apt update 的 Hit 和 Get 长列表

sudo apt update 的 Hit 和 Get 长列表

为什么在 期间有这么多重复获取类似包裹sudo apt update?这是正常的吗?以前,我注意到总共只有 5 到 7 个 Hit 或 Get。最近,我注意到这个更新列表似乎越来越长了。

Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease                                                    
Hit:2 http://archive.canonical.com/ubuntu bionic InRelease                                                 
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                                                                               
Get:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]     
Get:8 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]     
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [728 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [580 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [285 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [70.9 kB]                                                                                                                          
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [140 kB]                                                                                                                           
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [253 kB]                                                                                                                    
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [209 kB]                                                                                                                       
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [452 kB]                                                                                                                       
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]                                                                                                                 
Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7,924 B]                                                                                                                 
Get:19 http://archive.ubuntu.com/ubuntu bionic-security/main i386 Packages [368 kB]                                                                                                                               
Get:20 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [502 kB]                                                                                                                              
Get:21 http://archive.ubuntu.com/ubuntu bionic-security/main Translation-en [170 kB]                                                                                                                              
Get:22 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [22.6 kB]                                                                                                                      
Get:23 http://archive.ubuntu.com/ubuntu bionic-security/main DEP-11 48x48 Icons [10.4 kB]                                                                                                                         
Get:24 http://archive.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [31.7 kB]                                                                                                                         
Get:25 http://archive.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [6,600 B]                                                                                                                       
Get:26 http://archive.ubuntu.com/ubuntu bionic-security/restricted Translation-en [2,840 B]                                                                                                                       
Get:27 http://archive.ubuntu.com/ubuntu bionic-security/universe i386 Packages [590 kB]                                                                                                                           
Get:28 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [604 kB]                                                                                                                          
Get:29 http://archive.ubuntu.com/ubuntu bionic-security/universe Translation-en [201 kB]                                                                                                                          
Get:30 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42.1 kB]                                                                                                                  
Get:31 http://archive.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [116 kB]                                                                                                                      
Get:32 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]                                                                                                                
Fetched 5,652 kB in 23s (245 kB/s)                                                                                                                                                                                
Reading package lists... Done

更新:

我刚刚又跑了sudo apt update一次。这次只涉及 8 次 Hit & Get。为什么有时需要这么长的更新时间,而其他时候需要的更新时间却短得多?

Hit:1 http://archive.canonical.com/ubuntu bionic InRelease                                                 
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease                                                                                    
Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                              
Hit:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease                                                  
Hit:8 http://archive.ubuntu.com/ubuntu bionic-security InRelease                
Fetched 1,310 B in 2s (579 B/s)                      
Reading package lists... Done
Building dependency tree       
Reading state information... Done  

答案1

这是正常的,apt正在下载更新的软件包列表、元数据、图标、翻译,用于您配置的每个存储库。“命中”表示文件自上次下载以来没有更改,“获取”表示已apt下载。

第二次运行仅检查了文件;这些文件包含一个索引,其中包含可能下载的InRelease各种其他索引的校验和,并允许确定与系统上当前的内容相比是否有任何变化。如果没有任何变化,则不会下载任何其他内容。您也可以在第一次运行中看到这一点:前两个文件没有变化,因此没有为这些存储库下载任何其他内容。apt updateaptInRelease

答案2

这完全正常。您在“Get”行中看到的是您的机器在存储库更新过程中获取了不同的资源。“Hit”表示无需更新

相关内容