全球主机交流论坛

标题: Debian7和8 的可用源,解决apt-get update的404错误 [打印本页]

作者: 恋花    时间: 2019-4-25 08:44
标题: Debian7和8 的可用源,解决apt-get update的404错误
本帖最后由 恋花 于 2019-4-25 09:51 编辑

Debian 官方源失效了(太老放入存档了),导致更新和安装软件失败.

Debian7一键解决方法:

  1. cp -r /etc/apt/sources.list /etc/apt/sources.list.bak;echo "deb http://archive.debian.org/debian/ wheezy main contrib non-free" > /etc/apt/sources.list;cat /etc/apt/sources.list;apt-get update;
复制代码



其实就是把源修改为: http://archive.debian.org/debian/

发现的几个其他可用源,如果http://archive.debian.org/debian/太慢可以自己换换

# 阿里云的,目前可用,但可能是没同步好,过几天就和官方的同步了,就不行了.
http://mirrors.aliyun.com/debian/

# debian官方的存档
https://snapshot.debian.org/archive/debian/20190321T212815Z/

# 这里可以找到不少(其实只要点进去看看dists目录里有没有wheezy就知道了)
https://www.debian.org/distrib/archive


一键方案不明白的话,这是阿里云给的详细帮助,阿里云如果失效的话自己替换相关源的网址即可.

debian 7.x (wheezy)
编辑/etc/apt/sources.list文件(需要使用sudo), 在文件最前面添加以下条目(操作前请做好相应备份)

  1. deb http://mirrors.aliyun.com/debian/ wheezy main non-free contrib
  2. deb http://mirrors.aliyun.com/debian/ wheezy-proposed-updates main non-free contrib
  3. deb-src http://mirrors.aliyun.com/debian/ wheezy main non-free contrib
  4. deb-src http://mirrors.aliyun.com/debian/ wheezy-proposed-updates main non-free contrib
复制代码

debian 8.x (jessie)
编辑/etc/apt/sources.list文件(需要使用sudo), 在文件最前面添加以下条目(操作前请做好相应备份)

  1. deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib
  2. deb http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib
  3. deb-src http://mirrors.aliyun.com/debian/ jessie main non-free contrib
  4. deb-src http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib
复制代码

作者: tiberius    时间: 2019-4-25 09:02
最近ovz小鸡装bbr老是出错,这就解决方法来了,多谢楼主,mark了
作者: jianjam    时间: 2019-4-25 09:04
国外 连阿里不会慢么
作者: ramiko    时间: 2019-4-25 09:05
mark一下了
作者: h2o    时间: 2019-4-25 09:07
提示: 作者被禁止或删除 内容自动屏蔽
作者: yfn    时间: 2019-4-25 09:31
最近我的debian系统重装也是老出问题,一度怀疑是官方操作系统问题谢谢
作者: aRNoLD    时间: 2019-4-25 09:33
它官方的不智能,过期前完全可以弄个转接的
作者: reapers    时间: 2019-4-25 20:17
升级系统才是王道,Debian8已经停止部分源安全更新了   https://lists.debian.org/debian-mirrors/2019/03/msg00007.html
作者: cici9911    时间: 2019-4-25 21:17
我是直接改成stretch
没发现有啥问题。。。
作者: Twitch    时间: 2019-4-25 22:04
感谢,标记下
作者: fenghuang    时间: 2019-4-25 22:32
直接上Debian9就对了
作者: daniu    时间: 2019-4-25 23:16
马克,马克。这必须标记一下
作者: drawli    时间: 2019-4-25 23:22
cici9911 发表于 2019-4-25 21:17
我是直接改成stretch
没发现有啥问题。。。

这样子upgrade的话,会把系统给搞到d9去。

D8现在是转给LTS团队维护了,没啥**ug不会发布什么更新了。
作者: aRNoLD    时间: 2019-4-25 23:30
https://wiki.debian.org/LTS/Using




欢迎光临 全球主机交流论坛 (https://loc.010206.xyz/) Powered by Discuz! X3.4