你提到的 fetchdebian 可能是指 在 Debian / Ubuntu 等系统中,通过 apt / apt-get 下载 .deb 安装包(而不立即安装),或者是某个具体工具(如 fetch-debian 脚本)。下面我分几种常见情况说明。
sudo apt download 包名
例如:
apt download curl
会在当前目录生成:
curl_*.deb
apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests \
--no-conflicts --no-breaks --no-replaces --no-enhances 包名 | grep "^\w")
或者更简单一点(不递归依赖):
apt-get install --download-only 包名
下载位置:
/var/cache/apt/archives/
sudo apt install apt-rdepends
apt-rdepends -d 包名 | grep -v "^ " | xargs apt download
dpkg + apt 离线方案apt-get install --reinstall --download-only 包名
cp /var/cache/apt/archives/*.deb /tmp/debs/
sudo dpkg -i /path/to/*.deb
sudo apt -f install
fetch-debian 工具(或脚本)有些项目会提供类似:
fetch-debian package_name
如果是这种情况,请提供:
我可以给你精确命令。
直接访问:
搜索包名 → 选择架构 → 下载 .deb
如果你能告诉我: ✅ 是 在线还是离线 ✅ 是否要 依赖一起下 ✅ 用的系统(Debian / Ubuntu / 其他)
我可以给你一键脚本。