我是靠谱客的博主 精明大叔,这篇文章主要介绍linux在使用apt-get update出现错误,现在分享给大家,希望可以做个参考。

如果出现错误faile to fetch镜相源,可以尝试以下操作:

1.备份sources.list:

复制代码
1
sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

2.新建sources.list:

复制代码
1
sudo vim /etc/apt/sources.list

复制下面的源到sources.list:

修改成163源:

复制代码
1
2
3
4
5
6
7
8
deb Index of /debian/ stretch main non-free contrib deb Index of /debian/ stretch-updates main non-free contrib deb Index of /debian/ stretch-backports main non-free contrib deb-src Index of /debian/ stretch main non-free contrib deb-src Index of /debian/ stretch-updates main non-free contrib deb-src Index of /debian/ stretch-backports main non-free contrib deb Index of /debian-security/ stretch/updates main non-free contrib deb-src Index of /debian-security/ stretch/updates main non-free contrib

修改成清华源:

复制代码
1
2
3
4
5
6
7
8
deb Tsinghua Open Source Mirror stretch main non-free contrib deb Tsinghua Open Source Mirror stretch-updates main non-free contrib deb Tsinghua Open Source Mirror stretch-backports main non-free contrib deb-src Tsinghua Open Source Mirror stretch main non-free contrib deb-src Tsinghua Open Source Mirror stretch-updates main non-free contrib deb-src Tsinghua Open Source Mirror stretch-backports main non-free contrib deb Tsinghua Open Source Mirror stretch/updates main non-free contrib deb-src Tsinghua Open Source Mirror stretch/updates main non-free contrib

修改成科大源:

复制代码
1
2
3
4
5
6
7
8
deb Index of /debian/ stretch main non-free contrib deb http://mirrors.ustc.edu.cn/debian/ stretch-updates main non-free contrib deb http://mirrors.ustc.edu.cn/debian/ stretch-backports main non-free contrib deb-src http://mirrors.ustc.edu.cn/debian/ stretch main non-free contrib deb-src http://mirrors.ustc.edu.cn/debian/ stretch-updates main non-free contrib deb-src http://mirrors.ustc.edu.cn/debian/ stretch-backports main non-free contrib deb http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main non-free contrib deb-src http://mirrors.ustc.edu.cn/debian-security/ stretch/updates main non-free contrib

3、更新源

复制代码
1
sodu apt-get update -y

最后

以上就是精明大叔最近收集整理的关于linux在使用apt-get update出现错误的全部内容,更多相关linux在使用apt-get内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(66)

评论列表共有 0 条评论

立即
投稿
返回
顶部