报错 | apt-get update

报错如下:

E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/source/Sources  404  Not Found [IP: 91.189.91.23 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

把下面内容添加到 /etc/apt/sources.list 并注释掉#之前的镜像,解决:

# 更改镜像源
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
#deb http://archive.ubuntu.com/  main restricted universe multiverse
#deb-src http://archive.ubuntu.com/  main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse

输出如下:

Get:10 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-updates/restricted amd64 Packages [17.2 kB]
Get:11 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-updates/restricted Translation-en [4,028 B]
Get:12 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-updates/universe amd64 Packages [525 kB]
Get:13 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-updates/universe Translation-en [281 kB]
Get:14 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-updates/multiverse amd64 Packages [14.6 kB]
Get:15 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-updates/multiverse Translation-en [7,616 B]
Get:16 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-backports/main amd64 Packages [13.3 kB]
Get:17 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-backports/main Translation-en [7,503 B]
Get:18 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-backports/universe amd64 Packages [43.1 kB]
Get:19 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-backports/universe Translation-en [36.8 kB]
Get:20 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-backports/multiverse amd64 Packages [1,567 B]
Get:21 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-backports/multiverse Translation-en [1,215 B]
Get:22 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-security/main amd64 Packages [835 kB]
Get:23 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-security/main Translation-en [448 kB]
Get:24 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-security/restricted amd64 Packages [14.2 kB]
Get:25 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-security/restricted Translation-en [3,556 B]
Get:26 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-security/universe amd64 Packages [295 kB]
Get:27 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-security/universe Translation-en [162 kB]
Get:28 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-security/multiverse amd64 Packages [4,806 B]
Get:29 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty-security/multiverse Translation-en [2,564 B]
Get:30 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty/main amd64 Packages [1,350 kB]
Get:31 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty/restricted amd64 Packages [13.0 kB]
Get:32 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty/universe amd64 Packages [5,859 kB]
Get:33 https://mirrors.tuna.tsinghua.edu.cn/ubuntu trusty/multiverse amd64 Packages [132 kB]
Fetched 12.1 MB in 5s (2,082 kB/s)
Reading package lists... Done

Ref | ubuntu 执行 apt-get update 报错 Failed to fetch

--- End ---

你可能感兴趣的:(报错 | apt-get update)