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

 

未完待续。。。

  • 8
    点赞
  • 37
    收藏
    觉得还不错? 一键收藏
  • 8
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值