求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

18.04、16.04、14.04
user000001
帖子: 8
注册时间: 2018-04-26 19:11
系统: ubuntu16.04
送出感谢: 0
接收感谢: 0

求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#1

帖子 user000001 » 2018-04-26 19:30

E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/ ... 4/Packages 404 Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/ ... 4/Packages 404 Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/ ... 4/Packages 404 Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/ ... 4/Packages 404 Not Found [IP: 91.189.88.152 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.



网上很多方法
1.sudo apt-get clean
sudo apt-get update
2.更换其他的源,换过阿里的 阿里的源 始终 停留在 等待头部信息的界面
换过163的 也是报跟上述类似的错误
换回自带的 报上述错误
3.rm -rf /var/cache/apt/archives/
还删除了lock文件,
都没有正常,希望哪位大佬,给小弟指条名路,小弟感激不尽!
poloshiao
论坛版主
帖子: 18280
注册时间: 2009-08-04 16:33
送出感谢: 21 次
接收感谢: 1957 次

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#2

帖子 poloshiao » 2018-04-26 19:38

http://archive.ubuntu.com/ubuntu/dists/ ... ary-amd64/
沒問題

可能是 你短暫的網路 有問題
稍待一下 再試

如果一直有問題
把下面指令 複製 貼進終端機 執行
1. ping -c 3 archive.ubuntu.com
2. ping -c 3 91.189.88.152
3. sudo ls -al /etc/resolv.conf
4. sudo cat /etc/resolv.conf
把指令及結果直接 選取/複製 貼上來
user000001
帖子: 8
注册时间: 2018-04-26 19:11
系统: ubuntu16.04
送出感谢: 0
接收感谢: 0

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#3

帖子 user000001 » 2018-04-26 19:45

我都试过很多次了,折腾到现在起码有3个小时了,这不会是网络原因吧,我都可以ping通的
poloshiao
论坛版主
帖子: 18280
注册时间: 2009-08-04 16:33
送出感谢: 21 次
接收感谢: 1957 次

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#4

帖子 poloshiao » 2018-04-26 19:48

如果一直有問題
把下面指令 複製 貼進終端機 執行
1. ping -c 3 archive.ubuntu.com
2. ping -c 3 91.189.88.152
3. sudo ls -al /etc/resolv.conf
4. sudo cat /etc/resolv.conf
把指令及結果直接 選取/複製 貼上來
都可以ping通的
你沒有針對問題回答
問題是問你
把指令及結果直接 選取/複製 貼上來
user000001
帖子: 8
注册时间: 2018-04-26 19:11
系统: ubuntu16.04
送出感谢: 0
接收感谢: 0

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#5

帖子 user000001 » 2018-04-26 19:51

PING archive.ubuntu.com (91.189.88.149) 56(84) bytes of data.
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=1 ttl=40 time=322 ms
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=2 ttl=40 time=327 ms
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=3 ttl=40 time=334 ms

--- archive.ubuntu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 322.172/328.017/334.380/4.997 ms


PING 91.189.88.152 (91.189.88.152) 56(84) bytes of data.
64 bytes from 91.189.88.152: icmp_seq=1 ttl=52 time=443 ms
64 bytes from 91.189.88.152: icmp_seq=2 ttl=52 time=437 ms
64 bytes from 91.189.88.152: icmp_seq=3 ttl=52 time=402 ms

--- 91.189.88.152 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 402.702/427.702/443.310/17.858 ms

lrwxrwxrwx 1 root root 29 4月 18 18:26 /etc/resolv.conf -> ../run/resolvconf/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#nameserver 127.0.1.1
nameserver 8.8.8.8
nameserver 114.114.114.114
user000001
帖子: 8
注册时间: 2018-04-26 19:11
系统: ubuntu16.04
送出感谢: 0
接收感谢: 0

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#6

帖子 user000001 » 2018-04-26 19:58

[email protected]:~$ ping -c 3 archive.ubuntu.com
PING archive.ubuntu.com (91.189.88.162) 56(84) bytes of data.
64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=1 ttl=52 time=426 ms
64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=2 ttl=52 time=422 ms
64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=3 ttl=52 time=399 ms

--- archive.ubuntu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 399.875/416.103/426.222/11.591 ms


[email protected]:~/Desktop$ ping -c 3 91.189.88.152
PING 91.189.88.152 (91.189.88.152) 56(84) bytes of data.
64 bytes from 91.189.88.152: icmp_seq=1 ttl=52 time=443 ms
64 bytes from 91.189.88.152: icmp_seq=2 ttl=52 time=437 ms
64 bytes from 91.189.88.152: icmp_seq=3 ttl=52 time=402 ms

--- 91.189.88.152 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 402.702/427.702/443.310/17.858 ms


[email protected]:~/Desktop$ sudo ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 29 4月 18 18:26 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
[email protected]:~/Desktop$ sudo ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 29 4月 18 18:26 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
[email protected]:~/Desktop$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#nameserver 127.0.1.1
nameserver 8.8.8.8
nameserver 114.114.114.114
user000001
帖子: 8
注册时间: 2018-04-26 19:11
系统: ubuntu16.04
送出感谢: 0
接收感谢: 0

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#7

帖子 user000001 » 2018-04-26 19:59

[email protected]:~$ ping -c 3 archive.ubuntu.com
PING archive.ubuntu.com (91.189.88.162) 56(84) bytes of data.
64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=1 ttl=52 time=426 ms
64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=2 ttl=52 time=422 ms
64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=3 ttl=52 time=399 ms

--- archive.ubuntu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 399.875/416.103/426.222/11.591 ms


[email protected]:~/Desktop$ ping -c 3 91.189.88.152
PING 91.189.88.152 (91.189.88.152) 56(84) bytes of data.
64 bytes from 91.189.88.152: icmp_seq=1 ttl=52 time=443 ms
64 bytes from 91.189.88.152: icmp_seq=2 ttl=52 time=437 ms
64 bytes from 91.189.88.152: icmp_seq=3 ttl=52 time=402 ms

--- 91.189.88.152 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 402.702/427.702/443.310/17.858 ms


[email protected]:~/Desktop$ sudo ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 29 4月 18 18:26 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
[email protected]:~/Desktop$ sudo ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 29 4月 18 18:26 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
[email protected]:~/Desktop$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#nameserver 127.0.1.1
nameserver 8.8.8.8
nameserver 114.114.114.114
poloshiao
论坛版主
帖子: 18280
注册时间: 2009-08-04 16:33
送出感谢: 21 次
接收感谢: 1957 次

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#8

帖子 poloshiao » 2018-04-26 20:12

E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/ ... 4/Packages
404 Not Found [IP: 91.189.88.152 80]
PING archive.ubuntu.com (91.189.88.149) 56(84) bytes of data.
ping -c 3 archive.ubuntu.com
PING archive.ubuntu.com (91.189.88.162) 56(84) bytes of data.
1. archive.ubuntu.com 解析為
91.189.88.162
91.189.88.152
91.189.88.149
...
歷次不同 ?
cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
#nameserver 127.0.1.1
nameserver 8.8.8.8
nameserver 114.114.114.114
2. nameserver 127.0.1.1 前面 加 #
你是在哪個網頁 參考的 ?

3. 重複發文 請你自行移除 (右下方 打叉)
user000001
帖子: 8
注册时间: 2018-04-26 19:11
系统: ubuntu16.04
送出感谢: 0
接收感谢: 0

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#9

帖子 user000001 » 2018-04-26 20:25

dns这个是我一直都改的,一直都没有任何问题,我改回来你看一下

[email protected]:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
nameserver 8.8.8.8
nameserver 114.114.114.114
[email protected]:~$ sudo apt-get update
Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,201 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/main i386 Packages [1,196 kB]
Ign:7 http://archive.ubuntu.com/ubuntu xenial/main arm64 Packages
Get:8 http://archive.ubuntu.com/ubuntu xenial/main Translation-en [568 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial/main amd64 DEP-11 Metadata [733 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial/main DEP-11 64x64 Icons [409 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [8,344 B]
Get:12 http://archive.ubuntu.com/ubuntu xenial/restricted i386 Packages [8,684 B]
Get:13 http://archive.ubuntu.com/ubuntu xenial/restricted Translation-en [2,908 B]
Get:14 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 DEP-11 Metadata [186 B]
Get:15 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7,532 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial/universe i386 Packages [7,512 kB]
Ign:17 http://archive.ubuntu.com/ubuntu xenial/universe arm64 Packages
Get:18 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4,354 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial/universe amd64 DEP-11 Metadata [3,410 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial/universe DEP-11 64x64 Icons [7,448 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial/multiverse i386 Packages [140 kB]
Ign:23 http://archive.ubuntu.com/ubuntu xenial/multiverse arm64 Packages
Get:24 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
Get:25 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 DEP-11 Metadata [63.8 kB]
Get:26 http://archive.ubuntu.com/ubuntu xenial/multiverse DEP-11 64x64 Icons [230 kB]
Get:27 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [765 kB]
Get:28 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [706 kB]
Ign:29 http://archive.ubuntu.com/ubuntu xenial-updates/main arm64 Packages
Get:30 http://archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [317 kB]
Get:31 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [319 kB]
Get:32 http://archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [229 kB]
Get:33 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [7,560 B]
Get:34 http://archive.ubuntu.com/ubuntu xenial-updates/restricted i386 Packages [7,524 B]
Get:35 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Translation-en [2,272 B]
Get:36 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 DEP-11 Metadata [157 B]
Get:37 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [623 kB]
Get:38 http://archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [575 kB]
Ign:39 http://archive.ubuntu.com/ubuntu xenial-updates/universe arm64 Packages
Get:40 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [251 kB]
Get:41 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [246 kB]
Get:42 http://archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [331 kB]
Get:43 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.2 kB]
Get:44 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse i386 Packages [15.3 kB]
Ign:45 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse arm64 Packages
Get:46 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8,076 B]
Get:47 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [5,964 B]
Get:48 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse DEP-11 64x64 Icons [14.3 kB]
Get:49 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [4,844 B]
Get:50 http://archive.ubuntu.com/ubuntu xenial-backports/main i386 Packages [4,836 B]
Ign:51 http://archive.ubuntu.com/ubuntu xenial-backports/main arm64 Packages
Get:52 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [3,220 B]
Get:53 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3,328 B]
Get:54 http://archive.ubuntu.com/ubuntu xenial-backports/main DEP-11 64x64 Icons [29 B]
Get:55 http://archive.ubuntu.com/ubuntu xenial-backports/restricted amd64 DEP-11 Metadata [194 B]
Get:56 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7,400 B]
Get:57 http://archive.ubuntu.com/ubuntu xenial-backports/universe i386 Packages [7,080 B]
Ign:58 http://archive.ubuntu.com/ubuntu xenial-backports/universe arm64 Packages
Get:59 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3,996 B]
Get:60 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [5,088 B]
Get:61 http://archive.ubuntu.com/ubuntu xenial-backports/universe DEP-11 64x64 Icons [2,717 B]
Get:62 http://archive.ubuntu.com/ubuntu xenial-backports/multiverse amd64 DEP-11 Metadata [216 B]
Get:63 http://archive.ubuntu.com/ubuntu xenial-backports/multiverse DEP-11 64x64 Icons [29 B]
Ign:7 http://archive.ubuntu.com/ubuntu xenial/main arm64 Packages
Get:64 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages [481 kB]
Get:65 http://archive.ubuntu.com/ubuntu xenial-security/main i386 Packages [430 kB]
Ign:66 http://archive.ubuntu.com/ubuntu xenial-security/main arm64 Packages
Get:67 http://archive.ubuntu.com/ubuntu xenial-security/main Translation-en [207 kB]
Get:68 http://archive.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [67.5 kB]
Get:69 http://archive.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [68.0 kB]
Get:70 http://archive.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [7,224 B]
Get:71 http://archive.ubuntu.com/ubuntu xenial-security/restricted i386 Packages [7,224 B]
Get:72 http://archive.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2,152 B]
Get:73 http://archive.ubuntu.com/ubuntu xenial-security/restricted amd64 DEP-11 Metadata [200 B]
Get:74 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [344 kB]
Get:75 http://archive.ubuntu.com/ubuntu xenial-security/universe i386 Packages [299 kB]
Ign:76 http://archive.ubuntu.com/ubuntu xenial-security/universe arm64 Packages
Get:77 http://archive.ubuntu.com/ubuntu xenial-security/universe Translation-en [129 kB]
Get:78 http://archive.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [107 kB]
Get:79 http://archive.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [147 kB]
Get:80 http://archive.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3,208 B]
Get:81 http://archive.ubuntu.com/ubuntu xenial-security/multiverse i386 Packages [3,376 B]
Ign:82 http://archive.ubuntu.com/ubuntu xenial-security/multiverse arm64 Packages
Get:83 http://archive.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1,408 B]
Get:84 http://archive.ubuntu.com/ubuntu xenial-security/multiverse amd64 DEP-11 Metadata [212 B]
Get:85 http://archive.ubuntu.com/ubuntu xenial-security/multiverse DEP-11 64x64 Icons [29 B]
Ign:17 http://archive.ubuntu.com/ubuntu xenial/universe arm64 Packages
Ign:23 http://archive.ubuntu.com/ubuntu xenial/multiverse arm64 Packages
Ign:29 http://archive.ubuntu.com/ubuntu xenial-updates/main arm64 Packages
Ign:39 http://archive.ubuntu.com/ubuntu xenial-updates/universe arm64 Packages
Ign:45 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse arm64 Packages
Ign:51 http://archive.ubuntu.com/ubuntu xenial-backports/main arm64 Packages
Ign:58 http://archive.ubuntu.com/ubuntu xenial-backports/universe arm64 Packages
Ign:7 http://archive.ubuntu.com/ubuntu xenial/main arm64 Packages
Ign:66 http://archive.ubuntu.com/ubuntu xenial-security/main arm64 Packages
Ign:76 http://archive.ubuntu.com/ubuntu xenial-security/universe arm64 Packages
Ign:82 http://archive.ubuntu.com/ubuntu xenial-security/multiverse arm64 Packages
Ign:17 http://archive.ubuntu.com/ubuntu xenial/universe arm64 Packages
Ign:23 http://archive.ubuntu.com/ubuntu xenial/multiverse arm64 Packages
Ign:29 http://archive.ubuntu.com/ubuntu xenial-updates/main arm64 Packages
Ign:39 http://archive.ubuntu.com/ubuntu xenial-updates/universe arm64 Packages
Ign:45 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse arm64 Packages
Ign:51 http://archive.ubuntu.com/ubuntu xenial-backports/main arm64 Packages
Ign:58 http://archive.ubuntu.com/ubuntu xenial-backports/universe arm64 Packages
Err:7 http://archive.ubuntu.com/ubuntu xenial/main arm64 Packages
404 Not Found [IP: 91.189.88.152 80]
Ign:66 http://archive.ubuntu.com/ubuntu xenial-security/main arm64 Packages
Ign:76 http://archive.ubuntu.com/ubuntu xenial-security/universe arm64 Packages
Ign:82 http://archive.ubuntu.com/ubuntu xenial-security/multiverse arm64 Packages
Ign:17 http://archive.ubuntu.com/ubuntu xenial/universe arm64 Packages
Ign:23 http://archive.ubuntu.com/ubuntu xenial/multiverse arm64 Packages
Err:29 http://archive.ubuntu.com/ubuntu xenial-updates/main arm64 Packages
404 Not Found [IP: 91.189.88.152 80]
Ign:39 http://archive.ubuntu.com/ubuntu xenial-updates/universe arm64 Packages
Ign:45 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse arm64 Packages
Err:51 http://archive.ubuntu.com/ubuntu xenial-backports/main arm64 Packages
404 Not Found [IP: 91.189.88.152 80]
Ign:58 http://archive.ubuntu.com/ubuntu xenial-backports/universe arm64 Packages
Err:66 http://archive.ubuntu.com/ubuntu xenial-security/main arm64 Packages
404 Not Found [IP: 91.189.88.152 80]
Ign:76 http://archive.ubuntu.com/ubuntu xenial-security/universe arm64 Packages
Ign:82 http://archive.ubuntu.com/ubuntu xenial-security/multiverse arm64 Packages
Fetched 570 kB in 24s (23.5 kB/s)
Reading package lists... Done
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/ ... 4/Packages 404 Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/ ... 4/Packages 404 Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/ ... 4/Packages 404 Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/ ... 4/Packages 404 Not Found [IP: 91.189.88.152 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

至于解析为何不同,我不太清楚,改完后
[email protected]:~$ ping -c 3 archive.ubuntu.com
PING archive.ubuntu.com (91.189.88.149) 56(84) bytes of data.
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=1 ttl=50 time=324 ms
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=2 ttl=50 time=324 ms
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=3 ttl=50 time=324 ms

--- archive.ubuntu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 324.193/324.266/324.327/0.055 ms
[email protected]:~$ ping -c 3 archive.ubuntu.com
PING archive.ubuntu.com (91.189.88.152) 56(84) bytes of data.
64 bytes from steelix.canonical.com (91.189.88.152): icmp_seq=1 ttl=52 time=444 ms
64 bytes from steelix.canonical.com (91.189.88.152): icmp_seq=3 ttl=52 time=444 ms

--- archive.ubuntu.com ping statistics ---
3 packets transmitted, 2 received, 33% packet loss, time 2027ms
rtt min/avg/max/mdev = 444.214/444.595/444.976/0.381 ms
还是不一样!
user000001
帖子: 8
注册时间: 2018-04-26 19:11
系统: ubuntu16.04
送出感谢: 0
接收感谢: 0

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#10

帖子 user000001 » 2018-04-26 20:28

我拿一台正常的ubuntu16.04
[email protected]:~$ ping -c 3 archive.ubuntu.com
PING archive.ubuntu.com (91.189.88.162) 56(84) bytes of data.
64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=1 ttl=52 time=429 ms
64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=2 ttl=52 time=425 ms
64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=3 ttl=52 time=428 ms

--- archive.ubuntu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 425.095/427.822/429.766/1.985 ms
[email protected]:~$ ping -c 3 archive.ubuntu.com
PING archive.ubuntu.com (91.189.88.149) 56(84) bytes of data.
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=1 ttl=50 time=324 ms
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=2 ttl=50 time=324 ms
64 bytes from danava.canonical.com (91.189.88.149): icmp_seq=3 ttl=50 time=324 ms

--- archive.ubuntu.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 324.265/324.446/324.650/0.676 ms
也是不一样的
poloshiao
论坛版主
帖子: 18280
注册时间: 2009-08-04 16:33
送出感谢: 21 次
接收感谢: 1957 次

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#11

帖子 poloshiao » 2018-04-26 20:33

sudo ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 29 4月 18 18:26 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
nameserver 8.8.8.8
nameserver 114.114.114.114
1. 試試
暫時把
/etc/run/resolvconf/resolv.conf
nameserver 114.114.114.114
改為
# nameserver 114.114.114.114
看看 有何不同

2. 補充
以上假設你的
nameserver 8.8.8.8
沒有被阻擋
user000001
帖子: 8
注册时间: 2018-04-26 19:11
系统: ubuntu16.04
送出感谢: 0
接收感谢: 0

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#12

帖子 user000001 » 2018-04-26 20:41

/etc/run/resolvconf/resolv.conf
没这个路径啊
poloshiao
论坛版主
帖子: 18280
注册时间: 2009-08-04 16:33
送出感谢: 21 次
接收感谢: 1957 次

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#13

帖子 poloshiao » 2018-04-26 23:04

/etc/run/resolvconf/resolv.conf
没这个路径啊
0. 試試
/run/resolvconf/resolv.conf

1. sudo ls -al /etc/resolvconf/resolv.conf.d/
-rw-r--r-- 1 root root 0 6月 4 2015 base
-rw-r--r-- 1 root root 282 11月 29 2016 head

2. 下述兩個檔案
/etc/resolvconf/resolv.conf.d/base
/etc/resolvconf/resolv.conf.d/head
2-1. 或其它
/etc/resolvconf/resolv.conf.d/ 裡的檔案
2-2. 然後 重新開機
头像
astolia
论坛版主
帖子: 4694
注册时间: 2008-09-18 13:11
送出感谢: 1 次
接收感谢: 789 次

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#14

帖子 astolia » 2018-04-26 23:26

又一个 @poloshiao 把人往沟里带的典型案例

二楼明明已经摸到问题原因的边了,怎么又跑到纠结dns上去了

楼主出问题的文件路径是 http://archive.ubuntu.com/ubuntu/dists/ ... in/binary-arm64/Packages
这是针对arm64架构的CPU,不是amd64(x86-64),archive.ubuntu.com上只有针对x86架构的32位和64位CPU,没有arm的,当然会找不到文件

从9楼的输出看,楼主应该是在用amd64环境,某个时候用 dpkg --add-architecture arm64 错误的添加了arm64的multiarch
所以直接把arm64删掉就是
sudo dpkg --remove-architecture arm64
poloshiao
论坛版主
帖子: 18280
注册时间: 2009-08-04 16:33
送出感谢: 21 次
接收感谢: 1957 次

Re: 求助: ubuntu16.04 更换源之后 sudo apt-get update 报错

#15

帖子 poloshiao » 2018-04-27 7:01

楼主出问题的文件路径是 http://archive.ubuntu.com/ubuntu/dists/ ... in/binary-arm64/Packages
1. 謝謝提醒
viewtopic.php?p=3204204#p3204204
sudo apt-get update
Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,201 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/main i386 Packages [1,196 kB]
Ign:7 http://archive.ubuntu.com/ubuntu xenial/main arm64 Packages
2. 你的軟體來源 包含 amd64 / i386 / arm64 ...
ubuntu16.04
3. 把下面指令 複製 貼進終端機 執行
3-1. sudo cat /proc/cpuinfo
3-2. sudo cat /etc/apt/sources.list
把指令及結果直接 選取/複製 貼上來

4. 如果可能 查證一下
你下載的 iso 檔案 全名
回复

回到 “LTS 长支持版”