FetchDebian 的定位与适用场景
安装与准备
常用操作速览
| 目标 | 命令示例 | 说明 |
|---|---|---|
| 下载单个二进制包 | fetchdebian vim | 默认下载二进制包到当前目录 |
| 指定版本 | fetchdebian vim=2:8.2.0875-1 | 精确获取某个版本 |
| 仅下载依赖 | fetchdebian nginx –no-deps | 只取主包,不取依赖 |
| 指定输出目录 | fetchdebian curl -o /opt/pkgs | 将包保存到指定路径 |
| 下载源码包 | fetchdebian -s curl | 仅取源码(.dsc/.tar.* 等) |
| 下载二进制包 | fetchdebian -b nginx | 仅取二进制(.deb) |
| 显示下载 URL | fetchdebian -p git | 打印链接而不实际下载 |
| 静默/详细输出 | fetchdebian -q git / fetchdebian -v git | 控制输出冗余度 |
| 指定发行版/组件 | fetchdebian -d buster -c main,contrib nginx | 选择发行版与组件 |
| 跳过 GPG 检查 | fetchdebian –no-check-gpg vim | 不建议生产环境使用 |
| 代理支持 | fetchdebian –proxy http://proxy:8080 wget | 走代理下载 |
| 查看缓存目录 | fetchdebian –cache-dir | 显示本地缓存位置 |
| 批量下载 | while read p; do fetchdebian “$p”; done < list.txt | 从文件批量取包 |
| 以上命令覆盖了取包、版本、依赖、目录、源码/二进制、输出控制、发行版/组件、代理与缓存等常见需求。 |
离线安装与依赖处理
实用建议与排错