在 Debian 里“fetchdebian 源”一般有两种常见理解,我先分别说明,你按需取用。
这是最常见的需求,用于 apt update / apt install。
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo nano /etc/apt/sources.list
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
sudo apt update
目前 Debian 官方并没有叫 fetchdebian 的标准命令,可能是:
apt download 包名
或
sudo apt-get install --download-only 包名
apt-get 指定源拉包apt-get install -y --allow-downgrades 包名
请确认工具名,我可以给你具体配置方法。
cat /etc/os-release
或
lsb_release -a
如果你能补充一下:
我可以直接给你一份 可直接复制用的 sources.list。