技术知识分享

阿里云debian系统无法更新解决方案

宝塔面板永久版优惠券

本文介绍了阿里云debian源更新出现404错误时的解决方案。
错误

W: Failed to fetch <http://mirrors.cloud.aliyuncs.com/debian/dists/jessie/updates/main/source/Sources>404 Not Found
W: Failed to fetch <http://mirrors.cloud.aliyuncs.com/debian/dists/jessie/updates/contrib/source/Sources>404 Not Found
W: Failed to fetch <http://mirrors.cloud.aliyuncs.com/debian/dists/jessie/updates/non-free/source/Sources> 404 Not Found
W: Failed to fetch <http://mirrors.cloud.aliyuncs.com/debian/dists/jessie/updates/main/binary-amd64/Packages> 404 Not Found
W: Failed to fetch <http://mirrors.cloud.aliyuncs.com/debian/dists/jessie/updates/contrib/binary-amd64/Packages> 404 Not Found
W: Failed to fetch <http://mirrors.cloud.aliyuncs.com/debian/dists/jessie/updates/non-free/binary-amd64/Packages> 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

原因 aliyuncs内部服务器挂了

最简单的解决方案
用#将 /etc/apt/source.list.d/sources-aliyun-0.list 所有项注释掉。
img

然后修改 /etc/apt/source.list

#debian7

deb http://mirrors.163.com/debian wheezy main non-free contrib
deb http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free
deb-src http://mirrors.163.com/debian wheezy main non-free contrib
deb-src http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free
deb http://mirrors.163.com/debian-security wheezy/updates main contrib non-free 
deb-src http://mirrors.163.com/debian-security wheezy/updates main contrib non-free 

#debian8

deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib

然后 apt-get update 一下就可以拉。

2019-5-9 更新 因为Debian7、Debian8官方已经停止支持。所以进入了存档阶段。所有源都撤下了文件。所以得改成Debian存档源。把上面的http://mirrors.163.com修改为http://archive.debian.org

未经允许不得转载:pc6a学习分享 » 阿里云debian系统无法更新解决方案
阿里云轻量应用服务器

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址