Debian 9 Stretch APT问题

Debian 9 Stretch APT问题

flyfish

操作系统

Debian 9 Stretch

错误提示

使用sudo apt update错误提示

复制代码
Ign:1 http://mirrors.aliyun.com/debian stretch InRelease
Ign:2 http://mirrors.aliyun.com/debian-security stretch/updates InRelease
Ign:3 http://mirrors.aliyun.com/debian stretch-updates InRelease
Ign:4 http://mirrors.aliyun.com/debian stretch-backports InRelease
Err:5 http://mirrors.aliyun.com/debian stretch Release
  404  Not Found [IP: 211.93.250.32 80]
Err:6 http://mirrors.aliyun.com/debian-security stretch/updates Release
  404  Not Found [IP: 211.93.250.32 80]
Err:7 http://mirrors.aliyun.com/debian stretch-updates Release
  404  Not Found [IP: 211.93.250.32 80]
Err:8 http://mirrors.aliyun.com/debian stretch-backports Release
  404  Not Found [IP: 211.93.250.32 80]
Reading package lists... Done
E: The repository 'http://mirrors.aliyun.com/debian stretch Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://mirrors.aliyun.com/debian-security stretch/updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://mirrors.aliyun.com/debian stretch-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://mirrors.aliyun.com/debian stretch-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

错误原因

Debian 9 Stretch 生命周期结束

解决方法

如果您需要访问 Debian 的一个旧发行版,您可以在 Debian 归档中找到它们

如果您正在使用 APT,则相关的 sources.list 条目如下所示

复制代码
deb http://archive.debian.org/debian/ hamm contrib main non-free
或者
deb http://archive.debian.org/debian/ bo bo-unstable contrib main non-free

所以/etc/apt/sources.list正确的写法如下

复制代码
deb http://archive.debian.org/debian/ stretch main contrib non-free
deb-src http://archive.debian.org/debian/ stretch main contrib non-free
deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb http://archive.debian.org/debian/ stretch-backports main contrib non-free

参考地址

https://www.debian.org/distrib/archive.en.html

相关推荐
头茬韭菜3 天前
功能点 1:项目骨架与启动流程 —— 源码阅读笔记
运维·笔记·debian·fluss
抓不住时间的沙3 天前
N1搭建Hexo个人博客,部署到Github
python·docker·node.js·debian·github·arm
qetfw4 天前
Debian 部署 Discuz! 论坛:Nginx、PHP 与 MariaDB 配置
linux·运维·nginx·debian·php·discuz
qetfw7 天前
Debian OpenSSL CA 证书配置参考:根证书、服务证书与验证
linux·debian·ssl·openssl
qetfw10 天前
Debian OpenSSL 搭建 CA 证书服务:签发、吊销与客户端信任
linux·debian·openssl·ca
qetfw14 天前
Debian 使用 FTP 镜像源配置 APT 软件源
linux·debian·apt·ftp
XiangrongZ15 天前
debian中配置stm32的交叉编译环境
运维·stm32·debian
qetfw15 天前
Debian Apache2 执行 Shell CGI:动态时间页面配置与验证
linux·运维·debian
qetfw17 天前
Debian Apache2 实战:自定义站点目录、运行用户与 Basic Auth 认证
linux·运维·debian