如果出现错误faile to fetch镜相源,可以尝试以下操作:
1.备份sources.list:
复制代码
1sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
2.新建sources.list:
复制代码
1sudo vim /etc/apt/sources.list
复制下面的源到sources.list:
修改成163源:
复制代码
1
2
3
4
5
6
7
8deb 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
8deb 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
8deb 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、更新源
复制代码
1sodu apt-get update -y
最后
以上就是精明大叔最近收集整理的关于linux在使用apt-get update出现错误的全部内容,更多相关linux在使用apt-get内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复