背景:用镜像拉起的mysql5.6.44的容器,os是Debian GNU/Linux 9 (stretch)
这个错误表明系统仍在使用 Debian 9 (Stretch),但该版本已于 2022年6月30日 结束生命周期(EOL),官方仓库已下线。

解决方案
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| docker exec -it <container_name> bash
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 112695A0E562B32A 04E7233B7D453EEC EF0F382A1A7B6500 648ACFD622F3D138 0E98404D386FA1D9
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>
|
