我是靠谱客的博主 清爽夕阳,最近开发中收集的这篇文章主要介绍sudo apt-get update 各种问题!(ubuntu 16.04),觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

不知道大家最害怕什么linux命令,我最最最最害怕的就是 sudo apt-get update命令。我简直遇到了各种各样形形色色的问题,甚至有一些是网上找不到原因,最后不知道改了什么,莫名其妙又好了的问题。气到肝疼!

今后遇到的apt-get update 问题全都归纳总结到这里,做个记录,看能遇到多少!

会持续更新,一有问题就更新!

1.

E: Failed to fetch http://xxx.xxx.xxx.xxx/files/31210000008FF17B/mirror.neu.edu.cn/ubuntu/dists/trusty-updates/main/binary-amd64/Packages.bz2  
E: Failed to fetch http://xxx.xxx.xxx.xxx/files/51210000008A8BF7/mirror.neu.edu.cn/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages.bz2  
E: Failed to fetch http://xxx.xxx.xxx.xxx/files/21210000005B2D12/mirror.neu.edu.cn/ubuntu/dists/trusty-updates/universe/binary-i386/Packages.bz2  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.

解决方法:

换成阿里源(额。。。其实我之前用的就是阿里源,相当于重新粘了一遍,私以为这步没用)

sudo apt-get clean(好像没有成功,不过懒得管了)

sudo rm /var/lib/apt/lists/* -vf

参考博客:https://blog.csdn.net/tian_ciomp/article/details/51339635

https://blog.csdn.net/theonegis/article/details/59142193

https://blog.csdn.net/qq_35451572/article/details/79516563

https://blog.csdn.net/wang1144/article/details/51604424/

错误瞬间变成了如下:

W: The repository 'http://mirrors.aliyun.com/ubuntu raring Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://mirrors.aliyun.com/ubuntu raring-security Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://mirrors.aliyun.com/ubuntu raring-updates Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://mirrors.aliyun.com/ubuntu raring-proposed Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://mirrors.aliyun.com/ubuntu raring-backports Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/raring/main/source/Sources  404  Not Found [IP: 111.206.4.253 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/raring-security/main/source/Sources  404  Not Found [IP: 111.206.4.253 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/raring-updates/main/source/Sources  404  Not Found [IP: 111.206.4.253 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/raring-proposed/main/source/Sources  404  Not Found [IP: 111.206.4.253 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/raring-backports/main/source/Sources  404  Not Found [IP: 111.206.4.253 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

换了个我也不知道是哪里的源(原谅我的孤陋寡闻),竟然可以了!果然是源的问题吗?

sudo gedit /etc/apt/sources.list

将/etc/apt/sources.list文件替换为下面文件

deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ##测试版源
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse # 源码
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ##测试版源
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse

参考博客:https://blog.csdn.net/github_35160620/article/details/52115542

 

未完待续。。。

最后

以上就是清爽夕阳为你收集整理的sudo apt-get update 各种问题!(ubuntu 16.04)的全部内容,希望文章能够帮你解决sudo apt-get update 各种问题!(ubuntu 16.04)所遇到的程序开发问题。

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

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

评论列表共有 0 条评论

立即
投稿
返回
顶部