小Cの已经记不起来的博客

debian 7和8 apt默认源失效了!

实际上是有点年头的事情了, 只是我才反应过来...

新买的VPS, 只有比较老的debian版本(7.3), 装好系统过后按照国际惯例先装一些常用软件, vim啊git之内的; 结果使用apt-get安装软件的时候却发现提示 WARNING: The following packages cannot be authenticated!, 好端端的怎么包就验证无效了?

尝试 sudo apt-get update, 结果提示 Some index files failed to download, they have been ignored, or old ones used instead.

原来早在 2019年3月20号, 官方就有发布 Removal of Wheezy and Jessie (except LTS) from mirrors公告, 宣布将会从镜像中移除Wheezy 和 Jessie这两个版本的数据, 不过数据并没有被移除, 而是被归档到了 archive.debian.org 这个域名下.

解决方案

    # debian7
    sudo cp -r /etc/apt/sources.list /etc/apt/sources.list.bak
    sudo sh -c 'echo "deb http://archive.debian.org/debian/ wheezy main contrib non-free" > /etc/apt/sources.list'
    sudo apt-get update
    # debian8
    sudo cp -r /etc/apt/sources.list /etc/apt/sources.list.bak
    sudo sh -c 'echo "deb http://archive.debian.org/debian/ jessie main contrib non-free" > /etc/apt/sources.list'
    sudo apt-get update

衍生问题

其实出现这个问题的不只是debian默认源, 包括更换了阿里、163等国内源的都会遇到这个问题, 毕竟debian已经从镜像源站上移除了对Wheezy 和 Jessie的支持, 阿里、163等国内源同步移除也只是时间问题, 毕竟是镜像源。

那么有没有一个国内的归档镜像站呢?

404

评论

匿名 · wp:www.xiaoc.cn:10

163的站点的归档的.

发表评论

提交后评论将经过自动审核,审核通过后公开展示。

未在播放