debian 源 apt-spy (转)

本文介绍如何解决Debian系统中apt-get找不到包的问题。通过使用apt-spy工具,自动测试并选择最快的源进行下载。文章还提供了详细的命令操作步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

刚刚装完的debian的源文件不太完美,apt-get 的时候很多包都找不到。现在我们可以用 apt-spy,可以自动测试到哪个源的下载速度最快。

当然,刚装完系统时是没有 apt-spy 的,这时候我们可以暂时先找个可用的源代替,如(写在 /etc/apt/sources.list 中):

deb http:
//http.us.debian.org/debian/ stable main

执行以下命令更新软件包列表:

apt-
get update

然后执行以下命令安装 apt-spy:

apt-
get install apt-
spy

从源上下载一份源的镜像列表(http://http.us.debian.org/debian/README.mirrors.txt ):

apt-
spy update

测试亚洲地区的源的速度,并自动写入 sources.list:

apt-
spy -
d unstable -
a asia -
t 5

现在可以去 source.list 里看一下都更新了些什么。
# apt-spy -h

使用: apt-spy [选项]

选项:

#有时间再翻译一下
- d distribution Debian distribution ( ie, stable) . Required unless updating.
- a area Area to benchmark. ( eg, Europe) .
- c config Configuration file to use.
- e number Number of servers to benchmark before exiting.
- f file File to grab when benchmarking. ( relative to Debian base) .
- i file Specify input file . For use with the - w option.
- m mirror- list Mirror list to use, or mirror- list to update when updating.
- o output- file Where to put output.
- p proxy Proxy server to use. In format
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值