使用sudo apt-get update报错:E: 无法下载 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/dists/xenial/main/b
·
使用sudo apt-get update报错:
E: 无法下载 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/dists/xenial/main/binary-amd64/Packages 404 Not Found [IP: 101.6.15.130 80]
E: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。
原因分析:源的问题,更换源
先备份源文件
sudo cp /etc/apt/sources.list /etc/apt/sources-bak.list
修改源文件
sudo gedit /etc/apt/sources.list
将内容替换成
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
保存即可,重新运行sudo apt-get update
本教程使用的是ubuntu18.04,其他版本清参考以下网址替换内容
https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/
更多推荐
已为社区贡献4条内容
所有评论(0)