Debian11 bullseye 软件源配置
- 2026-09-10 19:34:00
- 丁国栋
- 原创 10
Debian11的官方软件源最近被加入了归档,原来在 debian或者debian-security里的包被移到了 debian-archive。根据官网提供的信息看,LTS 支持在 2026-08-31 已经结束。如果还是使用原来的软件源(例如 apt update 或者 apt install)会提示无法找到,或者类似如下信息:
E: Release file for http://mirrors.xxxx.com/debian-security/dists/bullseye-security/InRelease is expired (invalid since 3d 4h 19min 35s). Updates for this repository will not be applied.
提示Release文件已经过期,无法更新。
如果是腾讯云可以如下更改:
cat > /etc/apt/sources.list <<EOF # https://mirrors.cloud.tencent.com/help/debian.html deb http://mirrors.tencent.com/debian-archive/debian bullseye main contrib non-free deb http://mirrors.tencent.com/debian-archive/debian bullseye-updates main contrib non-free EOF
如果是 Dockerfile ,可以这样写:
FROM debian:11.3-slim RUN cat > /etc/apt/sources.list <<EOF # https://mirrors.cloud.tencent.com/help/debian.html deb http://mirrors.tencent.com/debian-archive/debian bullseye main contrib non-free deb http://mirrors.tencent.com/debian-archive/debian bullseye-updates main contrib non-free EOF RUN apt-get -o Acquire::https::Verify-Peer=false -o Acquire::https::Verify-Host=false update \ && apt-get -o Acquire::https::Verify-Peer=false -o Acquire::https::Verify-Host=false install ca-certificates -y \ && apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf /var/tmp/*
---
发表评论