unbutu apt-get update失败及解决办法

今天在用apt-get update更新时一直失败,报的错误为”Failed to fetch 404 Not Found”,由于个人镜像改成了mirrors.aliyun.com 我试着ping了一下发现能通,因此就在网上查找了下答案html

大部分的解释是由于每一个Ubuntu版本都有生命结束周期(EOL)时间;常规的Ubuntu发行版提供18个月的支持,而LTS(长期支持)版本则长达3年(服务器版本)和5年(桌面版本)。当某个Ubuntu版本达到生命结束周期时,其仓库就不能再访问了,你也不能再从Canonical获取任何维护更新和安全补丁。在撰写本文时,Ubuntu 13.04(急切的浣熊)已经达到了它的生命结束周期。ubuntu

若是你所使用的Ubuntu系统已经被结束生命周期,你就会从apt-get或aptitude获得如下404错误,由于它的仓库已经被遗弃了。安全

解决方法为讲/etc/apt/sources.list路径下的源替换为旧版本仓库的源。服务器

BUT,个人镜像是阿里云的镜像,貌似没有什么旧版本的路径,我就在/etc/apt/sources.list路径下删除,从新替换为下面的路径fetch

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

  再执行apt-get update就行了阿里云

若是还有问题,参考下面的两个方法rest

https://www.laozuo.org/11110.htmlhtm

https://yq.aliyun.com/articles/87106blog

相关文章
相关标签/搜索