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

概述

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

1.备份sources.list:

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

2.新建sources.list:

sudo vim /etc/apt/sources.list

复制下面的源到sources.list:

修改成163源:

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

修改成清华源:

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

修改成科大源:

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、更新源

sodu apt-get update -y

最后

以上就是精明大叔为你收集整理的linux在使用apt-get update出现错误的全部内容,希望文章能够帮你解决linux在使用apt-get update出现错误所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部