apt-get update 出现 404 错误,没有任何 PPA

apt-get update 出现 404 错误,没有任何 PPA

跑步时sudo apt-get 更新我收到 404 错误,我没有任何 PPA。

jeggy@Jeggy-XPS:~$ sudo apt-get update
[sudo] password for jeggy: 
Ign http://dk.archive.ubuntu.com utopic InRelease
Ign http://dk.archive.ubuntu.com utopic-updates InRelease                      
Ign http://dk.archive.ubuntu.com utopic-backports InRelease                    
Hit http://dk.archive.ubuntu.com utopic Release.gpg          
Hit http://dk.archive.ubuntu.com utopic-updates Release.gpg  
Hit http://dk.archive.ubuntu.com utopic-backports Release.gpg
Hit http://dk.archive.ubuntu.com utopic Release              
Hit http://dk.archive.ubuntu.com utopic-updates Release      
Ign http://extras.ubuntu.com utopic InRelease                
Hit http://dk.archive.ubuntu.com utopic-backports Release    
Hit http://extras.ubuntu.com utopic Release.gpg                                
Hit http://extras.ubuntu.com utopic Release                                    
Ign http://security.ubuntu.com utopic-security InRelease              
Get:1 http://security.ubuntu.com utopic-security Release.gpg [933 B]  
Hit http://extras.ubuntu.com utopic/main Sources                               
Get:2 http://dk.archive.ubuntu.com utopic/main Sources [1.046 kB]
Get:3 http://security.ubuntu.com utopic-security Release [59,7 kB]
Hit http://extras.ubuntu.com utopic/main amd64 Packages                        
Hit http://extras.ubuntu.com utopic/main i386 Packages                         
Get:4 http://security.ubuntu.com utopic-security/main Sources [7.232 B]        
Get:5 http://security.ubuntu.com utopic-security/restricted Sources [14 B]     
Get:6 http://security.ubuntu.com utopic-security/universe Sources [14 B]       
Get:7 http://security.ubuntu.com utopic-security/multiverse Sources [14 B]     
Get:8 http://security.ubuntu.com utopic-security/main amd64 Packages [15,0 kB] 
Get:9 http://security.ubuntu.com utopic-security/restricted amd64 Packages [14 B]
Ign http://extras.ubuntu.com utopic/main Translation-en_US                     
Get:10 http://security.ubuntu.com utopic-security/universe amd64 Packages [2.645 B]
Ign http://extras.ubuntu.com utopic/main Translation-en                        
Get:11 http://security.ubuntu.com utopic-security/multiverse amd64 Packages [14 B]
Get:12 http://security.ubuntu.com utopic-security/main i386 Packages [14,6 kB]
Get:13 http://security.ubuntu.com utopic-security/restricted i386 Packages [14 B]
Get:14 http://security.ubuntu.com utopic-security/universe i386 Packages [2.652 B]
Get:15 http://security.ubuntu.com utopic-security/multiverse i386 Packages [14 B]
Hit http://security.ubuntu.com utopic-security/multiverse Translation-en
Hit http://security.ubuntu.com utopic-security/restricted Translation-en
Hit http://security.ubuntu.com utopic-security/main Translation-en   
Hit http://security.ubuntu.com utopic-security/universe Translation-en
Get:16 http://dk.archive.ubuntu.com utopic/multiverse Sources [171 kB]          Get:17 http://dk.archive.ubuntu.com utopic/multiverse amd64 Packages [131 kB]  
Get:18 http://dk.archive.ubuntu.com utopic-updates/main Sources [4.264 kB]
Get:19 http://dk.archive.ubuntu.com utopic-updates/restricted Sources [7.232 B]
Get:20 http://dk.archive.ubuntu.com utopic-updates/universe Sources [14 B]     
Get:21 http://dk.archive.ubuntu.com utopic-updates/multiverse Sources [14 B]   
Get:22 http://dk.archive.ubuntu.com utopic-updates/main amd64 Packages [14 B]  
Get:23 http://dk.archive.ubuntu.com utopic-updates/restricted amd64 Packages [15,0 kB]
Get:24 http://dk.archive.ubuntu.com utopic-updates/universe amd64 Packages [14 B]
Get:25 http://dk.archive.ubuntu.com utopic-updates/multiverse amd64 Packages [2.645 B]
Get:26 http://dk.archive.ubuntu.com utopic-updates/main i386 Packages [14 B]   
Get:27 http://dk.archive.ubuntu.com utopic-updates/restricted i386 Packages [14,6 kB]
Get:28 http://dk.archive.ubuntu.com utopic-updates/universe i386 Packages [14 B]
Get:29 http://dk.archive.ubuntu.com utopic-updates/multiverse i386 Packages [2.652 B]
Get:30 http://dk.archive.ubuntu.com utopic-updates/main Translation-en [14 B]  
Get:31 http://dk.archive.ubuntu.com utopic-updates/multiverse Translation-en [10,0 kB]
Get:32 http://dk.archive.ubuntu.com utopic-updates/restricted Translation-en [14 B]
Get:33 http://dk.archive.ubuntu.com utopic-backports/restricted Sources [14 B] 
Hit http://dk.archive.ubuntu.com utopic-backports/restricted Translation-en    
Hit http://dk.archive.ubuntu.com utopic-backports/universe Translation-en      
Get:34 http://dk.archive.ubuntu.com utopic/restricted Sources [575 B]          
Get:35 http://dk.archive.ubuntu.com utopic/restricted amd64 Packages [18,4 kB] 
Get:36 http://dk.archive.ubuntu.com utopic/universe amd64 Packages [8.000 kB]
Hit http://dk.archive.ubuntu.com utopic-backports/main Sources                 
Hit http://dk.archive.ubuntu.com utopic-backports/universe Sources
Hit http://dk.archive.ubuntu.com utopic-backports/multiverse Sources
Hit http://dk.archive.ubuntu.com utopic-backports/main amd64 Packages
Hit http://dk.archive.ubuntu.com utopic-backports/restricted amd64 Packages
Hit http://dk.archive.ubuntu.com utopic-backports/universe amd64 Packages
Hit http://dk.archive.ubuntu.com utopic-backports/multiverse amd64 Packages
Hit http://dk.archive.ubuntu.com utopic-backports/main i386 Packages
Hit http://dk.archive.ubuntu.com utopic-backports/restricted i386 Packages
Hit http://dk.archive.ubuntu.com utopic-backports/universe i386 Packages
Hit http://dk.archive.ubuntu.com utopic-backports/multiverse i386 Packages
Get:37 http://dk.archive.ubuntu.com utopic/universe Sources [8.345 kB]
Err http://dk.archive.ubuntu.com utopic/main amd64 Packages
  404  Not Found [IP: 194.19.194.51 80]
Err http://dk.archive.ubuntu.com utopic/main i386 Packages
  404  Not Found [IP: 194.19.194.51 80]
Err http://dk.archive.ubuntu.com utopic/restricted i386 Packages
  404  Not Found [IP: 194.19.194.51 80]
Err http://dk.archive.ubuntu.com utopic/universe i386 Packages
  404  Not Found [IP: 194.19.194.51 80]
Err http://dk.archive.ubuntu.com utopic/multiverse i386 Packages
  404  Not Found [IP: 194.19.194.51 80]
Hit http://dk.archive.ubuntu.com utopic/multiverse Translation-en              
Hit http://dk.archive.ubuntu.com utopic/restricted Translation-en
Get:38 http://dk.archive.ubuntu.com utopic/universe Translation-en [19,5 MB]
Get:39 http://dk.archive.ubuntu.com utopic-updates/universe Translation-en [5.776 B]
Get:40 http://dk.archive.ubuntu.com utopic-backports/main Translation-en       
Get:41 http://dk.archive.ubuntu.com utopic-backports/multiverse Translation-en 
Hit http://dk.archive.ubuntu.com utopic/main Translation-en                    
Fetched 32,3 MB in 10min 11s (52,8 kB/s)                                       
W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic/restricted/source/Sources  Hash Sum mismatch

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic/main/binary-amd64/Packages  404  Not Found [IP: 194.19.194.51 80]

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic/main/binary-i386/Packages  404  Not Found [IP: 194.19.194.51 80]

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic/restricted/binary-i386/Packages  404  Not Found [IP: 194.19.194.51 80]

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic/universe/binary-i386/Packages  404  Not Found [IP: 194.19.194.51 80]

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic/multiverse/binary-i386/Packages  404  Not Found [IP: 194.19.194.51 80]

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic-updates/main/source/Sources  Hash Sum mismatch

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic-updates/restricted/source/Sources  Hash Sum mismatch

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic-updates/main/binary-amd64/Packages  Hash Sum mismatch

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic-updates/restricted/binary-amd64/Packages  Hash Sum mismatch

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic-updates/universe/binary-amd64/Packages  Hash Sum mismatch

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic-updates/multiverse/binary-amd64/Packages  Hash Sum mismatch

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic-updates/main/binary-i386/Packages  Hash Sum mismatch

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic-updates/restricted/binary-i386/Packages  Hash Sum mismatch

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic-updates/universe/binary-i386/Packages  Hash Sum mismatch

W: Failed to fetch http://dk.archive.ubuntu.com/ubuntu/dists/utopic-updates/multiverse/binary-i386/Packages  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.
jeggy@Jeggy-XPS:~$ 

为什么会发生这种情况?如何解决?我正在运行 Ubuntu 14.10

答案1

这可能只是镜像更新时的竞争条件。也可能您使用了透明代理,甚至可能您自己都不知道。

无论如何,只需等待几个小时或一夜,然后重试。

如果错误仍然存​​在,您可以更改为另一个存储库(例如...... us.archive.ubuntu.com)或删除/var/lib/apt/lists目录中先前下载的索引文件。

答案2

我在服务器方面也遇到了同样的问题ru

LaunchPad 上有一个错误: https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1394494

目前的解决方法是切换到主服务器:

在此处输入图片描述

答案3

您的网络出现问题或服务器暂时瘫痪。您可以稍后再试。

您可以使用 wget 检查是否可以访问服务器:

wget http://dk.archive.ubuntu.com/

答案4

我测试了美国服务器,有人说不行。测试了一些荷兰服务器,也不行,还有很多 Ubuntu 服务器也不行或不可用。虽然 Ubuntu 有一个选项可以寻找最佳工作且可用服务器。现在一切正常。

sudo update-manager

然后选择标签Ubuntu Software-> Downloaded from-> other->Select Best server

现在它确实有效了

在此处输入图片描述

相关内容