Debian 9 (Stretch)仓库无法使用

背景:用镜像拉起的mysql5.6.44的容器,os是Debian GNU/Linux 9 (stretch)

这个错误表明系统仍在使用 Debian 9 (Stretch),但该版本已于 2022年6月30日 结束生命周期(EOL),官方仓库已下线。

解决方案

复制代码
# 进入容器
docker exec -it <container_name> bash

# 导入 Debian 归档密钥
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 112695A0E562B32A 04E7233B7D453EEC EF0F382A1A7B6500 648ACFD622F3D138 0E98404D386FA1D9

# 修改 apt 源为归档镜像
cat > /etc/apt/sources.list << 'EOF'
deb http://archive.debian.org/debian/ stretch main contrib non-free
deb http://archive.debian.org/debian-security stretch/updates main contrib non-free
EOF

# 清理并更新(忽略有效期)
rm -rf /etc/apt/sources.list.d/mysql.list
apt-get clean
apt-get update -o Acquire::Check-Valid-Until=false -o Acquire::AllowInsecureRepositories=true || true

# 允许未签名安装(应急)
apt-get install -y --allow-unauthenticated <package_name>
相关推荐
特长腿特长5 小时前
centos、ubantu系列机的用户和用户组的结构是什么?具体怎么配置?用户组权限怎么使用?这篇文章持续更新,帮助你复习linux的基础知识
linux·运维·centos
zzzyyy5385 小时前
Linux环境变量
linux·运维·服务器
赛博云推-Twitter热门霸屏工具6 小时前
Twitter运营完整流程:从0到引流获客全流程拆解(2026)
运维·安全·自动化·媒体·twitter
CHHC18806 小时前
NetCore树莓派桌面应用程序
linux·运维·服务器
帮我吧智能服务平台7 小时前
装备制造智能制造升级:远程运维与智能服务如何保障产线OEE
运维·服务器·制造
w6100104667 小时前
cka-2026-cri-dockerd
运维·k8s·cka
卤炖阑尾炎8 小时前
PostgreSQL 日常运维全指南:从基础操作到备份恢复
运维·数据库·postgresql
handsomestWei8 小时前
Docker引擎API接入配置
运维·http·docker·容器·api
Tingjct8 小时前
Linux常用指令
linux·运维·服务器
daad7779 小时前
wifi_note
运维·服务器·数据库