“FetchDebian”并不是 Debian 官方的一个标准命令或工具,通常大家说的 fetchdebian 可能指以下几种情况之一。我先按常见场景说明,如果你指的是别的东西,可以再补充。
有些用户会用 fetch-debian 或 debootstrap / fetch 脚本 来:
sudo apt update
sudo apt install debootstrap
sudo debootstrap stable /mnt/debian http://deb.debian.org/debian
然后:
mount --bind /dev /mnt/debian/dev
mount --bind /proc /mnt/debian/proc
mount --bind /sys /mnt/debian/sys
chroot /mnt/debian
编辑:
sudo nano /etc/apt/sources.list
示例(Debian 12 bookworm):
deb http://deb.debian.org/debian bookworm main contrib non-free
deb http://deb.debian.org/debian bookworm-updates main contrib non-free
deb http://security.debian.org/debian-security bookworm-security main
然后:
sudo apt update
如果是某个第三方脚本(如用于自动安装软件的 fetchdebian):
一般步骤是:
git clone https://github.com/xxx/fetchdebian.git
cd fetchdebian
chmod +x fetchdebian.sh
sudo ./fetchdebian.sh
⚠️ 注意:
FROM debian:bookworm
RUN apt update && apt install -y curl wget
你可以告诉我:
我可以直接给你一份可用的配置文件或脚本。